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 the missing table sync due to improper invalidation handling
Date: Thu, 25 Apr 2024 05:33:58 +0000
Message-ID: <E1rzrk5-003lyA-VX@gemulon.postgresql.org> (raw)

Fix the missing table sync due to improper invalidation handling.

We missed performing table sync if the invalidation happened while the
non-ready tables list was being prepared. This occurs because the sync
state was set to valid at the end of non-ready table list preparation
irrespective of the invalidations processed while the list is being
prepared.

Fix it by changing the boolean variable to a tri-state enum and by setting
table state to valid only if no invalidations have occurred while the list
is being prepared.

Reprted-by: Alexander Lakhin
Diagnosed-by: Alexander Lakhin
Author: Vignesh C
Reviewed-by: Hou Zhijie, Alexander Lakhin, Ajin Cherian, Amit Kapila
Backpatch-through: 15
Discussion: https://postgr.es/m/711a6afe-edb7-1211-cc27-1bef8239eec7@gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 25 +++++++++++++++++++++----
src/tools/pgindent/typedefs.list            |  1 +
2 files changed, 22 insertions(+), 4 deletions(-)



view thread (4+ messages)

Message-ID: <E1rzrk5-003lyA-VX@gemulon.postgresql.org>
Permalink:  ../E1rzrk5-003lyA-VX@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rzrk5-003lyA-VX@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix the missing table sync due to improper invalidation handling
  In-Reply-To: <E1rzrk5-003lyA-VX@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