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 fetching default toast value during decoding of in-progress
Date: Mon, 07 Oct 2024 10:22:57 +0000
Message-ID: <E1sxktF-002XJY-ME@gemulon.postgresql.org> (raw)

Fix fetching default toast value during decoding of in-progress transactions.

During logical decoding of in-progress transactions, we perform the toast
table scan while fetching the default toast value for an attribute. We
forgot to initialize the flag during this scan to indicate that the system
table scan is in progress. We need this flag to ensure that during logical
decoding we never directly access the tableam or heap APIs because we check
for concurrent aborts only in systable_* APIs.

Reported-by: Alexander Lakhin
Author: Takeshi Ideriha, Hou Zhijie
Reviewed-by: Amit Kapila, Hou Zhijie
Backpatch-through: 14
Discussion: https://postgr.es/m/18641-6687273b7f15269d@postgresql.org

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8175a7d11f70589f6b44e28a8dd804f7542d0bbf

Modified Files
--------------
contrib/test_decoding/expected/stream.out | 20 ++++++++++++++++++++
contrib/test_decoding/sql/stream.sql      | 18 ++++++++++++++++++
src/backend/access/index/genam.c          | 16 ++++++++++++++++
3 files changed, 54 insertions(+)



view thread (9+ messages)  latest in thread

Message-ID: <E1sxktF-002XJY-ME@gemulon.postgresql.org>
Permalink:  ../E1sxktF-002XJY-ME@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sxktF-002XJY-ME@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 fetching default toast value during decoding of in-progress
  In-Reply-To: <E1sxktF-002XJY-ME@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