Commit e4e2afa
committed
[yugabyte#25052] XCluster: DDL Replication for supported pg extensions
Summary:
This diff adds ddl replication support for the most common pg extensions supported by YB along with tests.
Complete list of extensions obtained from tested:
- file_fdw
- fuzzystrmatch
- pgcrypto
- postgres_fdw
- sslinfo
- uuid-ossp
- hypopg
- pg_stat_monitor
- pgaudit
- hll
- hstore
- pg_trgm
- pgtap
- tablefunc
- vector
A few additional notes:
# Some of the extensions do create types and this change has started allowing CREATE/ALTER/DROP TYPE. No work has been done to preserve the OIDs of the types on source/target. This will come in later once we add support for User-defined types to be used in tables. Most extensions that create types are using the type within functions and not persisting data with it.
# Extensions that create tables under the covers have not been enabled e.g. pg_cron, pg_partman. These fail as they execute CREATE TABLE as part of extension creation which is a not a simple pass through DDL. This is intentional for now with a workaround of installing these extensions on non-replicated databases.
Jira: DB-14183
Test Plan:
ybt xcluster_ddl_replication_pgregress-test XClusterPgRegressDDLReplicationTest.PgRegressCreateDropPgOnlyDdls
ybt xcluster_ddl_replication_pgregress-test XClusterPgRegressDDLReplicationTest.PgRegressAlterPgOnlyDdls
ybt xcluster_ddl_replication_pgregress-test XClusterPgRegressDDLReplicationTest.PgRegressCreateDropTablePartitions2
ybt xcluster_ddl_replication_pgregress-test XClusterPgRegressDDLReplicationTest.PgRegressCreateDropExtensions
Reviewers: jhe, xCluster, hsunder
Reviewed By: jhe
Subscribers: yql
Differential Revision: https://phorge.dev.yugabyte.com/D404521 parent c240554 commit e4e2afa
File tree
8 files changed
+318
-35
lines changed- python/yugabyte
- src
- postgres/yb-extensions/yb_xcluster_ddl_replication
- yb/integration-tests/xcluster
- sql
8 files changed
+318
-35
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
Lines changed: 70 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
| |||
55 | 64 | | |
56 | 65 | | |
57 | 66 | | |
58 | | - | |
59 | 67 | | |
| 68 | + | |
60 | 69 | | |
61 | 70 | | |
62 | 71 | | |
| |||
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| 91 | + | |
82 | 92 | | |
83 | 93 | | |
84 | | - | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
| 98 | + | |
89 | 99 | | |
90 | 100 | | |
91 | 101 | | |
| |||
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
| 114 | + | |
104 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
105 | 146 | | |
106 | 147 | | |
107 | 148 | | |
| |||
147 | 188 | | |
148 | 189 | | |
149 | 190 | | |
150 | | - | |
| 191 | + | |
151 | 192 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | 193 | | |
157 | 194 | | |
158 | 195 | | |
159 | 196 | | |
160 | 197 | | |
161 | 198 | | |
162 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
163 | 212 | | |
164 | 213 | | |
165 | 214 | | |
| |||
239 | 288 | | |
240 | 289 | | |
241 | 290 | | |
242 | | - | |
| 291 | + | |
243 | 292 | | |
244 | 293 | | |
245 | 294 | | |
| |||
312 | 361 | | |
313 | 362 | | |
314 | 363 | | |
315 | | - | |
| 364 | + | |
316 | 365 | | |
317 | 366 | | |
318 | 367 | | |
| |||
353 | 402 | | |
354 | 403 | | |
355 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
356 | 408 | | |
357 | 409 | | |
358 | 410 | | |
359 | 411 | | |
360 | 412 | | |
361 | 413 | | |
362 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
363 | 418 | | |
364 | 419 | | |
365 | 420 | | |
366 | 421 | | |
367 | 422 | | |
| 423 | + | |
368 | 424 | | |
369 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
370 | 431 | | |
371 | 432 | | |
372 | 433 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
0 commit comments