postgresql/src/include/storage
Noah Misch 3baf804b72 At end of recovery, reset all sinval-managed caches.
An inplace update's invalidation messages are part of its transaction's
commit record.  However, the update survives even if its transaction
aborts or we stop recovery before replaying its transaction commit.
After recovery, a backend that started in recovery could update the row
without incorporating the inplace update.  That could result in a table
with an index, yet relhasindex=f.  That is a source of index corruption.

This bulk invalidation avoids the functional consequences.  A future
change can fix the !RecoveryInProgress() scenario without changing the
WAL format.  Back-patch to v17 - v12 (all supported versions).  v18 will
instead add invalidations to WAL.

Discussion: https://postgr.es/m/20240618152349.7f.nmisch@google.com
2024-10-25 06:51:07 -07:00
..
.gitignore When trace_lwlocks is used, identify individual lwlocks by name. 2015-09-11 14:01:39 -04:00
backendid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
barrier.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
block.h Remove some pointless code in block.h. 2022-03-03 19:15:38 -05:00
buf.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
buf_internals.h Ensure we use the correct spelling of "ensure" 2023-11-10 00:17:07 +13:00
buffile.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
bufmgr.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
bufpage.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
checksum.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
checksum_impl.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
condition_variable.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
copydir.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dsm.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dsm_impl.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
fd.h Revert recent changes with durable_rename_excl() 2022-04-28 13:08:16 +09:00
fileset.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
freespace.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
fsm_internals.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
indexfsm.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
ipc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
item.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
itemid.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
itemptr.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
large_object.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
latch.h Pre-beta mechanical code beautification. 2022-05-12 15:17:30 -04:00
lmgr.h Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX. 2024-06-27 19:21:10 -07:00
lock.h Lock before setting relhassubclass on RELKIND_PARTITIONED_INDEX. 2024-06-27 19:21:10 -07:00
lockdefs.h For inplace update durability, make heap_update() callers wait. 2024-09-24 15:25:23 -07:00
lwlock.h lwlock: Fix quadratic behavior with very long wait lists 2024-01-18 11:12:31 +09:00
md.h Rethink PROCSIGNAL_BARRIER_SMGRRELEASE. 2022-05-07 16:32:10 +12:00
off.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_sema.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_shmem.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pmsignal.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
predicate.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
predicate_internals.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
proc.h lwlock: Fix quadratic behavior with very long wait lists 2024-01-18 11:12:31 +09:00
procarray.h Improve heuristics for compressing the KnownAssignedXids array. 2022-11-29 15:43:17 -05:00
proclist.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
proclist_types.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
procsignal.h Fix DROP {DATABASE,TABLESPACE} on Windows. 2022-02-12 10:21:23 +13:00
reinit.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
relfilenode.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
s_lock.h Allow use of __sync_lock_test_and_set for spinlocks on any machine. 2022-11-02 17:37:26 -04:00
sharedfileset.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
shm_mq.h shm_mq_sendv: Fix flushing bug when receiver not yet attached. 2022-05-31 08:46:54 -04:00
shm_toc.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
shmem.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sinval.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
sinvaladt.h At end of recovery, reset all sinval-managed caches. 2024-10-25 06:51:07 -07:00
smgr.h Rethink PROCSIGNAL_BARRIER_SMGRRELEASE. 2022-05-07 16:32:10 +12:00
spin.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
standby.h Fix MVCC bug with prepared xact with subxacts on standby 2024-06-27 21:10:31 +03:00
standbydefs.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
sync.h Update copyright for 2022 2022-01-07 19:04:57 -05:00