pgsql: Receive invalidation messages correctly in tablesync worker

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Receive invalidation messages correctly in tablesync worker
Date: 2017-06-03 15:44:49
Message-ID: E1dHBEP-0005Cf-UL@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Receive invalidation messages correctly in tablesync worker

We didn't accept any invalidation messages until the whole sync process
had finished (because it flattens all the remote transactions in the
single one). So the sync worker didn't learn about subscription
changes/drop until it has finished. This could lead to "orphaned" sync
workers.

Author: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
Reported-by: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/66b84fa82f7318d8da75dbf754df16eb7b1f1037

Modified Files
--------------
src/backend/replication/logical/worker.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2017-06-03 17:48:23 pgsql: Fix old corner-case logic error in final_cost_nestloop().
Previous Message Peter Eisentraut 2017-06-03 13:21:28 pgsql: Make tablesync worker exit when apply dies while it was waiting