1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-22 12:22:45 +03:00
Files
postgres/src/backend
Noah Misch 67bab53d64 Fix parallel worker tracking of new catalog relfilenumbers.
Reunite RestorePendingSyncs() with RestoreRelationMap().  If
RelationInitPhysicalAddr() ran after RestoreRelationMap() but before
RestorePendingSyncs(), the relcache entry could cause RelationNeedsWAL()
to return true erroneously.  Trouble required commands of the current
transaction to include REINDEX or CLUSTER of a system catalog.  The
parallel leader correctly derived RelationNeedsWAL()==false from the new
relfilenumber, but the worker saw RelationNeedsWAL()==true.  Worker
MarkBufferDirtyHint() then wrote unwanted WAL.  Recovery of that
unwanted WAL could lose tuples like the system could before commit
c6b92041d3 introduced this tracking.
RestorePendingSyncs() and RestoreRelationMap() were adjacent till commit
126ec0bc76, so no back-patch for now.

Reviewed by Tom Lane.

Discussion: https://postgr.es/m/20241019232815.c6.nmisch@google.com
2024-10-24 09:16:38 -07:00
..
2024-10-08 10:51:20 +09:00
2024-06-24 13:11:27 +02:00
2024-07-30 23:01:55 +12:00
2024-06-21 08:17:23 +02:00
2024-05-14 12:57:22 +02:00