pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix initialization of RelationSyncEntry for streaming transactio
Date: Wed, 16 Sep 2020 02:31:12 +0000
Message-ID: <E1kINE0-0000VY-Ft@gemulon.postgresql.org> (raw)

Fix initialization of RelationSyncEntry for streaming transactions.

In commit 464824323e, for each RelationSyncEntry we maintained the list
of xids (streamed_txns) for which we have already sent the schema. This
helps us to track when to send the schema to the downstream node for
replication of streaming transactions. Before this list got initialized,
we were processing invalidation messages which access this list and led
to an assertion failure.

In passing, clean up the nearby code:

* Initialize the list of xids with NIL instead of NULL which is our usual
coding practice.
* Remove the MemoryContext switch for creating a RelationSyncEntry in dynahash.

Diagnosed-by: Amit Kapila and Tom Lane
Author: Amit Kapila
Reviewed-by: Tom Lane and Dilip Kumar
Discussion: https://postgr.es/m/904373.1600033123@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/69bd60672af63eaa8b19cdcea175df5ff172e80e

Modified Files
--------------
src/backend/replication/pgoutput/pgoutput.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)



Message-ID: <E1kINE0-0000VY-Ft@gemulon.postgresql.org>
Permalink:  ../E1kINE0-0000VY-Ft@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kINE0-0000VY-Ft@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: akapila@postgresql.org
  Subject: Re: pgsql: Fix initialization of RelationSyncEntry for streaming transactio
  In-Reply-To: <E1kINE0-0000VY-Ft@gemulon.postgresql.org>
  References: <E1kINE0-0000VY-Ft@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