postgresql/contrib/test_decoding/sql
Álvaro Herrera cd7b204b2d
Disallow direct use of the pgrepack logical decoding plugin
Nothing is to be gained from using pgrepack outside of REPACK
(CONCURRENTLY), and it leads to assertion failures in assertion-enabled
builds, and to crashes due to bogus memory lifetime in production
builds.  Reject attempts to do that with a clean error report.

Clean up the nearby code a tad while at it.  The only functional changes
in that are that the output_writer_private context is allocated and
partially filled by the pgrepack output plugin; and that ->relid therein
is now always present (rather than only in assertion-enabled builds).
Other than that it's just minor code rearrangement and added comments.

Author: Álvaro Herrera <alvherre@kurilemu.de>
Reported-by: Nikita Kalinin <n.kalinin@postgrespro.ru>
Suggested-by: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: Antonin Houska <ah@cybertec.at> (older version)
Reviewed-by: Srinath Reddy Sadipiralla <srinath2133@gmail.com> (older version)
Discussion: https://postgr.es/m/19500-38a02529a69353a5@postgresql.org
2026-06-09 20:12:55 +02:00
..
binary.sql test_decoding: Protect against rare spurious test failures. 2015-09-22 15:39:46 +02:00
ddl.sql Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
decoding_in_xact.sql Make RelationFlushRelation() work without ResourceOwner during abort 2024-06-06 18:56:28 +03:00
decoding_into_rel.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
messages.sql Add flush option to pg_logical_emit_message() 2023-10-18 11:24:59 +09:00
permissions.sql Add a slot synchronization function. 2024-02-14 09:45:36 +05:30
prepared.sql Add skip-empty-xacts option to test_decoding for use in the regression tests. 2014-09-01 15:59:44 +02:00
repack.sql Disallow direct use of the pgrepack logical decoding plugin 2026-06-09 20:12:55 +02:00
replorigin.sql Add optional pid parameter to pg_replication_origin_session_setup(). 2025-09-19 05:38:40 +00:00
rewrite.sql Revert "Logical decoding of sequences" 2022-04-07 20:06:36 +02:00
slot.sql Add a slot synchronization function. 2024-02-14 09:45:36 +05:30
spill.sql Make contrib/test_decoding regression tests safe for CZ locale. 2016-11-21 20:39:28 -05:00
stats.sql Add mem_exceeded_count column to pg_stat_replication_slots. 2025-10-08 10:05:04 -07:00
stream.sql Skip logical decoding of already-aborted transactions. 2025-02-12 16:31:34 -08:00
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 Stabilize the test added by commit 022564f60c. 2024-10-08 12:25:52 +05:30
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