diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index 7abf9343beeff774da70e1debb3ee6174ec5cafd..411d4b8a29268b203ca795c5ca1022a42656a9a5 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -449,18 +449,18 @@ GetNewObjectId(void)
 	 * iterations in GetNewOid.)  Note we are relying on unsigned comparison.
 	 *
 	 * During initdb, we start the OID generator at FirstBootstrapObjectId, so
-	 * we only enforce wrapping to that point when in bootstrap or standalone
-	 * mode.  The first time through this routine after normal postmaster
-	 * start, the counter will be forced up to FirstNormalObjectId. This
-	 * mechanism leaves the OIDs between FirstBootstrapObjectId and
-	 * FirstNormalObjectId available for automatic assignment during initdb,
-	 * while ensuring they will never conflict with user-assigned OIDs.
+	 * we only wrap if before that point when in bootstrap or standalone mode.
+	 * The first time through this routine after normal postmaster start, the
+	 * counter will be forced up to FirstNormalObjectId.  This mechanism
+	 * leaves the OIDs between FirstBootstrapObjectId and FirstNormalObjectId
+	 * available for automatic assignment during initdb, while ensuring they
+	 * will never conflict with user-assigned OIDs.
 	 */
 	if (ShmemVariableCache->nextOid < ((Oid) FirstNormalObjectId))
 	{
 		if (IsPostmasterEnvironment)
 		{
-			/* wraparound in normal environment */
+			/* wraparound, or first post-initdb assignment, in normal mode */
 			ShmemVariableCache->nextOid = FirstNormalObjectId;
 			ShmemVariableCache->oidCount = 0;
 		}
@@ -469,8 +469,8 @@ GetNewObjectId(void)
 			/* we may be bootstrapping, so don't enforce the full range */
 			if (ShmemVariableCache->nextOid < ((Oid) FirstBootstrapObjectId))
 			{
-				/* wraparound in standalone environment? */
-				ShmemVariableCache->nextOid = FirstBootstrapObjectId;
+				/* wraparound in standalone mode (unlikely but possible) */
+				ShmemVariableCache->nextOid = FirstNormalObjectId;
 				ShmemVariableCache->oidCount = 0;
 			}
 		}