Provide enough space for knownXids array
authorPavan Deolasee <[email protected]>
Fri, 26 Oct 2018 08:41:19 +0000 (14:11 +0530)
committerPavan Deolasee <[email protected]>
Fri, 26 Oct 2018 08:41:19 +0000 (14:11 +0530)
Commit be7777d2a9d8d70c931e80868f4f7e373f3f98f8 rearranged things so that the
intial XID value is set appropriately in the GTM control file. But that seems
to have caused problem with a standby setup and the array to hold knownXids is
no longer enough. Hence make some adjustments there.

This was stopping a standby from starting up correctly as observed during the
tests.

src/backend/storage/ipc/procarray.c

index 7e9cf57dfb0a411717865ebc412d8382f41c4a46..26afd15841e9842e8080370facc653c8bf60f476 100644 (file)
@@ -291,7 +291,7 @@ CreateSharedProcArray(void)
                procArray->numProcs = 0;
                procArray->maxProcs = PROCARRAY_MAXPROCS;
                procArray->maxKnownAssignedXids = TOTAL_MAX_CACHED_SUBXIDS +
-                       CONTROL_INTERVAL;
+                       CONTROL_INTERVAL + InitialGXIDValue_Default;
                procArray->numKnownAssignedXids = 0;
                procArray->tailKnownAssignedXids = 0;
                procArray->headKnownAssignedXids = 0;