Skip to content

Commit 4d4c891

Browse files
committed
Initialize replication_slot_catalog_xmin in procarray
Although not confirmed and probably rare, if the newly allocated memory is not already zero, this could possibly have caused some problems. Also reorder the initializations slightly so they match the order of the struct definition. Author: Wong, Yi Wen <yiwong@amazon.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
1 parent 0a2d43d commit 4d4c891

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/storage/ipc/procarray.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,14 @@ CreateSharedProcArray(void)
237237
*/
238238
procArray->numProcs = 0;
239239
procArray->maxProcs = PROCARRAY_MAXPROCS;
240-
procArray->replication_slot_xmin = InvalidTransactionId;
241240
procArray->maxKnownAssignedXids = TOTAL_MAX_CACHED_SUBXIDS;
242241
procArray->numKnownAssignedXids = 0;
243242
procArray->tailKnownAssignedXids = 0;
244243
procArray->headKnownAssignedXids = 0;
245244
SpinLockInit(&procArray->known_assigned_xids_lck);
246245
procArray->lastOverflowedXid = InvalidTransactionId;
246+
procArray->replication_slot_xmin = InvalidTransactionId;
247+
procArray->replication_slot_catalog_xmin = InvalidTransactionId;
247248
}
248249

249250
allProcs = ProcGlobal->allProcs;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy