postgresql/contrib/test_decoding/sql
Amit Kapila 54ccfd6586 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:32:51 +05:30
..
binary.sql test_decoding: Protect against rare spurious test failures. 2015-09-22 15:39:46 +02:00
ddl.sql Make test_decoding ddl.out shorter 2023-07-24 17:48:06 +02:00
decoding_in_xact.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
decoding_into_rel.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
messages.sql Add BEGIN/COMMIT for transactional messages during decoding. 2023-07-11 08:31:11 +05:30
permissions.sql Establish conventions about global object names used in regression tests. 2016-07-17 18:42:43 -04:00
prepared.sql Add skip-empty-xacts option to test_decoding for use in the regression tests. 2014-09-01 15:59:44 +02:00
replorigin.sql Fix the misuse of origin filter across multiple pg_logical_slot_get_changes() calls. 2023-09-27 14:32:51 +05:30
rewrite.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
slot.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
spill.sql Make contrib/test_decoding regression tests safe for CZ locale. 2016-11-21 20:39:28 -05:00
stats.sql pgstat: add/extend tests for resetting various kinds of stats. 2022-04-07 15:43:43 -07:00
stream.sql Fix assertion during streaming of multi-insert toast changes. 2021-05-27 07:59:43 +05:30
time.sql logical decoding: fix decoding of a commit's commit time. 2016-03-02 23:42:21 -08:00
toast.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
truncate.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
twophase.sql Use PG_TEST_TIMEOUT_DEFAULT for pg_regress suite non-elapsing timeouts. 2022-03-04 18:53:13 -08:00
twophase_stream.sql Add option to enable two_phase commits via pg_create_logical_replication_slot. 2021-03-03 07:34:11 +05:30
xact.sql Don't propagate a null subtransaction snapshot up to parent transaction. 2016-08-07 13:15:55 -04:00