Thread: [COMMITTERS] pgsql: Improve handover logic between sync and apply workers

[COMMITTERS] pgsql: Improve handover logic between sync and apply workers

From
Peter Eisentraut
Date:
Improve handover logic between sync and apply workers

Make apply busy wait check the catalog instead of shmem state to ensure
that next transaction will see the expected table synchronization state.

Also make the handover always go through same set of steps to make the
overall process easier to understand and debug.

Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Tested-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Tested-by: Erik Rijkers <er@xs4all.nl>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e3a815d2faa5be28551e71d5db44fb2c78133433

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 246 +++++++++++++++-------------
1 file changed, 136 insertions(+), 110 deletions(-)