forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit54ccfd6

Amit Kapila
Fix the misuse of origin filter across multiple pg_logical_slot_get_changes() calls.
The pgoutput module uses a global variable (publish_no_origin) to cachethe action for the origin filter, but we didn't reset the flag whenshutting down the output plugin, so subsequent retries may access theprevious publish_no_origin value.We fix this by storing the flag in the output plugin's private data.Additionally, the patch removes the currently unused origin string from thestructure.For the back branch, to avoid changing the exposed structure, we eliminated theglobal variable and instead directly used the origin string for changefiltering.Author: Hou ZhijieReviewed-by: Amit Kapila, Michael PaquierBackpatch-through: 16Discussion:http://postgr.es/m/OS0PR01MB571690EF24F51F51EFFCBB0E94FAA@OS0PR01MB5716.jpnprd01.prod.outlook.com1 parent6fc3a13 commit54ccfd6
File tree
4 files changed
+90
-9
lines changed- contrib/test_decoding
- expected
- sql
- src
- backend/replication/pgoutput
- include/replication
4 files changed
+90
-9
lines changedLines changed: 56 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + |
Lines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + |
Lines changed: 11 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 |
| - | |
86 | 85 |
| |
87 | 86 |
| |
88 | 87 |
| |
| |||
381 | 380 |
| |
382 | 381 |
| |
383 | 382 |
| |
| 383 | + | |
| 384 | + | |
384 | 385 |
| |
385 | 386 |
| |
386 | 387 |
| |
387 | 388 |
| |
388 | 389 |
| |
389 | 390 |
| |
390 |
| - | |
391 |
| - | |
392 |
| - | |
393 |
| - | |
394 |
| - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
395 | 396 |
| |
396 | 397 |
| |
397 | 398 |
| |
398 |
| - | |
| 399 | + | |
399 | 400 |
| |
400 | 401 |
| |
401 | 402 |
| |
| |||
1673 | 1674 |
| |
1674 | 1675 |
| |
1675 | 1676 |
| |
1676 |
| - | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
1677 | 1680 |
| |
1678 | 1681 |
| |
1679 | 1682 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 |
| - | |
| 32 | + | |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
|
0 commit comments
Comments
(0)