postgresql/src/backend/utils/cache
Michael Paquier a5ea825f95 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
2023-07-14 11:15:34 +09:00
..
attoptcache.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
catcache.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
evtcache.c Rename EVT cache hash to make context name unique 2023-07-05 08:53:09 +02:00
inval.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
lsyscache.c Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
Makefile Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
partcache.c Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
plancache.c Avoid Assert failure when processing empty statement in aborted xact. 2023-06-21 11:07:24 -04:00
relcache.c Add indisreplident to fields refreshed by RelationReloadIndexInfo() 2023-07-14 11:15:34 +09:00
relfilenumbermap.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
relmapper.c Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00
spccache.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
syscache.c Add SysCacheGetAttrNotNull for guaranteed not-null attrs 2023-03-25 22:49:33 +01:00
ts_cache.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00
typcache.c Remove useless casts to (void *) in hash_search() calls 2023-02-06 09:41:01 +01:00