postgresql/src/include/replication
Tom Lane d5daae47db Fix construction of updated-columns bitmap in logical replication.
Commit b9c130a1f failed to apply the publisher-to-subscriber column
mapping while checking which columns were updated.  Perhaps less
significantly, it didn't exclude dropped columns either.  This could
result in an incorrect updated-columns bitmap and thus wrong decisions
about whether to fire column-specific triggers on the subscriber while
applying updates.  In HEAD (since commit 9de77b545), it could also
result in accesses off the end of the colstatus array, as detected by
buildfarm member skink.  Fix the logic, and adjust 003_constraints.pl
so that the problem is exposed in unpatched code.

In HEAD, also add some assertions to check that we don't access off
the ends of these newly variable-sized arrays.

Back-patch to v10, as b9c130a1f was.

Discussion: https://postgr.es/m/CAH2-Wz=79hKQ4++c5A060RYbjTHgiYTHz=fw6mptCtgghH2gJA@mail.gmail.com
2020-07-20 13:40:16 -04:00
..
backup_manifest.h Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
basebackup.h Don't export basebackup.c's sendTablespace(). 2020-06-17 10:57:34 -04:00
decode.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
logical.h Rework XLogReader callback system 2020-05-08 15:40:11 -04:00
logicallauncher.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
logicalproto.h Fix construction of updated-columns bitmap in logical replication. 2020-07-20 13:40:16 -04:00
logicalrelation.h Initial pgindent and pgperltidy run for v13. 2020-05-14 13:06:50 -04:00
logicalworker.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
message.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
origin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
output_plugin.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
pgoutput.h Allow logical replication to transfer data in binary format. 2020-07-18 12:44:51 -04:00
reorderbuffer.h Revert "Track statistics for spilling of changes from ReorderBuffer". 2020-07-13 08:53:23 +05:30
slot.h Save slot's restart_lsn when invalidated due to size 2020-06-24 14:15:17 -04:00
snapbuild.h Update copyrights for 2020 2020-01-01 12:21:45 -05:00
syncrep.h Fix race conditions in synchronous standby management. 2020-04-18 14:02:44 -04:00
walreceiver.h Allow logical replication to transfer data in binary format. 2020-07-18 12:44:51 -04:00
walsender.h Generate backup manifests for base backups, and validate them. 2020-04-03 15:05:59 -04:00
walsender_private.h Revert "Track statistics for spilling of changes from ReorderBuffer". 2020-07-13 08:53:23 +05:30
worker_internal.h Fix replication/worker_internal.h to compile without other headers. 2020-07-18 14:58:18 -04:00