pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf
Date: Fri, 14 Jul 2023 02:16:48 +0000
Message-ID: <E1qK8MS-000G5m-AU@gemulon.postgresql.org> (raw)

Add indisreplident to fields refreshed by RelationReloadIndexInfo()

RelationReloadIndexInfo() is a fast-path used for index reloads in the
relation cache, and it has always forgotten about updating
indisreplident, which is something that would happen after an index is
selected for a replica identity.  This can lead to incorrect cache
information provided when executing a command in a transaction context
that updates indisreplident.

None of the code paths currently on HEAD that need to check upon
pg_index.indisreplident fetch its value from the relation cache, always
relying on a fresh copy on the syscache.  Unfortunately, this may not be
the case of out-of-core code, that could see out-of-date value.

Author: Shruthi Gowda
Reviewed-by: Robert Haas, Dilip Kumar, Michael Paquier
Discussion: https://postgr.es/m/CAASxf_PBcxax0wW-3gErUyftZ0XrCs3Lrpuhq4-Z3Fak1DoW7Q@mail.gmail.com
Backpatch-through: 11

Branch
------
REL_15_STABLE

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

Modified Files
--------------
src/backend/utils/cache/relcache.c | 1 +
1 file changed, 1 insertion(+)



view thread (7+ messages)  latest in thread

Message-ID: <E1qK8MS-000G5m-AU@gemulon.postgresql.org>
Permalink:  ../E1qK8MS-000G5m-AU@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qK8MS-000G5m-AU@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: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add indisreplident to fields refreshed by RelationReloadIndexInf
  In-Reply-To: <E1qK8MS-000G5m-AU@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