pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix updating of pg_subscription_rel from workers
Date: Wed, 07 Jun 2017 17:54:50 +0000
Message-ID: <E1dIfAQ-0007kv-EA@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Fix updating of pg_subscription_rel from workers

A logical replication worker should not insert new rows into
pg_subscription_rel, only update existing rows, so that there are no
races if a concurrent refresh removes rows.  Adjust the API to be able
to choose that behavior.

Author: Masahiko Sawada <sawada.mshk@gmail.com>
Reported-by: tushar <tushar.ahuja@enterprisedb.com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/644ea35fc1352d845299563c7ddfb8b524ed27d9

Modified Files
--------------
src/backend/catalog/pg_subscription.c       | 13 +++++++++----
src/backend/commands/subscriptioncmds.c     |  4 ++--
src/backend/replication/logical/tablesync.c | 11 +++++++----
src/include/catalog/pg_subscription_rel.h   |  2 +-
4 files changed, 19 insertions(+), 11 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1dIfAQ-0007kv-EA@gemulon.postgresql.org>
Permalink:  ../E1dIfAQ-0007kv-EA@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dIfAQ-0007kv-EA@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: pgsql: Fix updating of pg_subscription_rel from workers
  In-Reply-To: <E1dIfAQ-0007kv-EA@gemulon.postgresql.org>
  References: <E1dIfAQ-0007kv-EA@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox