postgresql/src/include/commands
Á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
..
alter.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
async.h Convert SLRUs to use the new shmem allocation functions 2026-04-06 02:13:02 +03:00
collationcmds.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
comment.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
conversioncmds.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
copy.h Add option force_array for COPY JSON FORMAT 2026-03-20 08:40:17 -04:00
copyapi.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
copyfrom_internal.h Optimize COPY FROM (FORMAT {text,csv}) using SIMD. 2026-03-13 11:07:32 -05:00
createas.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
dbcommands.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
dbcommands_xlog.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
defrem.h Add some const qualifiers enabled by typeof_unqual change on copyObject 2026-03-19 06:35:54 +01:00
discard.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
event_trigger.h Add some const qualifiers enabled by typeof_unqual change on copyObject 2026-03-19 06:35:54 +01:00
explain.h Reduce header inclusions via execnodes.h 2026-03-16 14:34:57 +01:00
explain_dr.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
explain_format.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
explain_state.h Add EXPLAIN (IO) infrastructure with BitmapHeapScan support 2026-04-07 22:33:34 +02:00
extension.h Harden _int_matchsel() against being attached to the wrong operator. 2026-02-09 10:14:22 -05:00
lockcmds.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
matview.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
policy.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
portalcmds.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
prepare.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
proclang.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
progress.h Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
propgraphcmds.h SQL Property Graph Queries (SQL/PGQ) 2026-03-16 10:14:18 +01:00
publicationcmds.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
repack.h Harmonize function parameter names for Postgres 19. 2026-04-22 12:47:19 -04:00
repack_internal.h Disallow direct use of the pgrepack logical decoding plugin 2026-06-09 20:12:55 +02:00
schemacmds.h Don't try to re-order the subcommands of CREATE SCHEMA. 2026-04-06 15:16:25 -04:00
seclabel.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
sequence.h Fix typos and inconsistencies in code and comments 2026-01-05 09:19:15 +09:00
sequence_xlog.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
subscriptioncmds.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
tablecmds.h Don't include storage/lock.h in so many headers 2026-03-24 17:11:12 +01:00
tablespace.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
trigger.h Optimize fast-path FK checks with batched index probes 2026-04-03 14:33:53 +09:00
typecmds.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
user.h Add new GUC createrole_self_grant. 2023-01-10 12:44:49 -05:00
vacuum.h Add support for importing statistics from remote servers. 2026-04-08 19:15:00 +09:00
view.h Update copyright for 2026 2026-01-01 13:24:10 -05:00
wait.h Explicitly forbid non-top-level WAIT FOR execution 2026-04-13 14:04:52 +03:00