postgresql/src/backend/replication/logical
Amit Kapila aa79bde725 Fix the missing table sync due to improper invalidation handling.
We missed performing table sync if the invalidation happened while the
non-ready tables list was being prepared. This occurs because the sync
state was set to valid at the end of non-ready table list preparation
irrespective of the invalidations processed while the list is being
prepared.

Fix it by changing the boolean variable to a tri-state enum and by setting
table state to valid only if no invalidations have occurred while the list
is being prepared.

Reprted-by: Alexander Lakhin
Diagnosed-by: Alexander Lakhin
Author: Vignesh C
Reviewed-by: Hou Zhijie, Alexander Lakhin, Ajin Cherian, Amit Kapila
Backpatch-through: 15
Discussion: https://postgr.es/m/711a6afe-edb7-1211-cc27-1bef8239eec7@gmail.com
2024-04-25 10:40:52 +05:30
..
Makefile Add a slot synchronization function. 2024-02-14 09:45:36 +05:30
applyparallelworker.c Replace BackendIds with 0-based ProcNumbers 2024-03-03 19:38:22 +02:00
decode.c Merge prune, freeze and vacuum WAL record formats 2024-03-25 14:59:58 +02:00
launcher.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
logical.c Ensure that the sync slots reach a consistent state after promotion without losing data. 2024-04-03 14:04:59 +05:30
logicalfuncs.c Introduce a new GUC 'standby_slot_names'. 2024-03-08 08:10:45 +05:30
meson.build Add a slot synchronization function. 2024-02-14 09:45:36 +05:30
message.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
origin.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00
proto.c Remove unused 'countincludesself' argument to pq_sendcountedtext() 2024-03-04 12:56:05 +02:00
relation.c Admit deferrable PKs into rd_pkindex, but flag them as such 2024-03-08 16:32:29 +01:00
reorderbuffer.c Revert indexed and enlargable binary heap implementation. 2024-04-11 17:18:05 +09:00
slotsync.c Fix typos and duplicate words 2024-04-18 21:28:07 +02:00
snapbuild.c Ensure that the sync slots reach a consistent state after promotion without losing data. 2024-04-03 14:04:59 +05:30
tablesync.c Fix the missing table sync due to improper invalidation handling. 2024-04-25 10:40:52 +05:30
worker.c Remove unused #include's from backend .c files 2024-03-04 12:02:20 +01:00