mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-09 08:10:09 +08:00
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>
This commit is contained in:
parent
0a2d43d988
commit
4d4c891715
@ -237,13 +237,14 @@ CreateSharedProcArray(void)
|
||||
*/
|
||||
procArray->numProcs = 0;
|
||||
procArray->maxProcs = PROCARRAY_MAXPROCS;
|
||||
procArray->replication_slot_xmin = InvalidTransactionId;
|
||||
procArray->maxKnownAssignedXids = TOTAL_MAX_CACHED_SUBXIDS;
|
||||
procArray->numKnownAssignedXids = 0;
|
||||
procArray->tailKnownAssignedXids = 0;
|
||||
procArray->headKnownAssignedXids = 0;
|
||||
SpinLockInit(&procArray->known_assigned_xids_lck);
|
||||
procArray->lastOverflowedXid = InvalidTransactionId;
|
||||
procArray->replication_slot_xmin = InvalidTransactionId;
|
||||
procArray->replication_slot_catalog_xmin = InvalidTransactionId;
|
||||
}
|
||||
|
||||
allProcs = ProcGlobal->allProcs;
|
||||
|
Loading…
Reference in New Issue
Block a user