pgsql: Improve handover logic between sync and apply workers

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve handover logic between sync and apply workers
Date: 2017-06-06 18:51:12
Message-ID: E1dIJZQ-0006mU-Ux@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)jelinek(at)2ndquadrant(dot)com>
Tested-by: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
Tested-by: Erik Rijkers <er(at)xs4all(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2017-06-06 23:23:19 Re: pgsql: Unify SIGHUP handling between normal and walsender backends.
Previous Message Robert Haas 2017-06-06 16:28:33 pgsql: Fix some cases of "the the" split across two lines.