postgresql/contrib/test_decoding
Amit Kapila 8d05be9319 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 cache
the action for the origin filter, but we didn't reset the flag when
shutting down the output plugin, so subsequent retries may access the
previous 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 the
structure.

For the back branch, to avoid changing the exposed structure, we eliminated the
global variable and instead directly used the origin string for change
filtering.

Author: Hou Zhijie
Reviewed-by: Amit Kapila, Michael Paquier
Backpatch-through: 16
Discussion: http://postgr.es/m/OS0PR01MB571690EF24F51F51EFFCBB0E94FAA@OS0PR01MB5716.jpnprd01.prod.outlook.com
2023-09-27 14:20:57 +05:30
..
expected Fix the misuse of origin filter across multiple pg_logical_slot_get_changes() calls. 2023-09-27 14:20:57 +05:30
specs Fix assertion failures while processing NEW_CID record in logical decoding. 2022-10-20 08:49:48 +05:30
sql Fix the misuse of origin filter across multiple pg_logical_slot_get_changes() calls. 2023-09-27 14:20:57 +05:30
t Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
.gitignore Improve isolation tests infrastructure. 2017-03-14 15:56:17 -07:00
Makefile Fix catalog lookup with the wrong snapshot during logical decoding. 2022-08-11 10:09:24 +05:30
logical.conf Stabilize streaming tests in test_decoding. 2022-04-20 08:59:55 +05:30
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
test_decoding.c Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00