diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 4165f31f921..b6864f83c03 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -645,7 +645,6 @@ static TimeLineID openLogTLI = 0; * Those values are kept consistent as long as crash recovery runs. */ static XLogRecPtr LocalMinRecoveryPoint; -static TimeLineID LocalMinRecoveryPointTLI; static bool updateMinRecoveryPoint = true; /* For WALInsertLockAcquire/Release functions */ @@ -2724,7 +2723,6 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force) /* update local copy */ LocalMinRecoveryPoint = ControlFile->minRecoveryPoint; - LocalMinRecoveryPointTLI = ControlFile->minRecoveryPointTLI; if (XLogRecPtrIsInvalid(LocalMinRecoveryPoint)) updateMinRecoveryPoint = false; @@ -2759,7 +2757,6 @@ UpdateMinRecoveryPoint(XLogRecPtr lsn, bool force) ControlFile->minRecoveryPointTLI = newMinRecoveryPointTLI; UpdateControlFile(); LocalMinRecoveryPoint = newMinRecoveryPoint; - LocalMinRecoveryPointTLI = newMinRecoveryPointTLI; ereport(DEBUG2, (errmsg_internal("updated min recovery point to %X/%X on timeline %u", @@ -3139,7 +3136,6 @@ XLogNeedsFlush(XLogRecPtr record) if (!LWLockConditionalAcquire(ControlFileLock, LW_SHARED)) return true; LocalMinRecoveryPoint = ControlFile->minRecoveryPoint; - LocalMinRecoveryPointTLI = ControlFile->minRecoveryPointTLI; LWLockRelease(ControlFileLock); /* @@ -5788,12 +5784,10 @@ StartupXLOG(void) if (InArchiveRecovery) { LocalMinRecoveryPoint = ControlFile->minRecoveryPoint; - LocalMinRecoveryPointTLI = ControlFile->minRecoveryPointTLI; } else { LocalMinRecoveryPoint = InvalidXLogRecPtr; - LocalMinRecoveryPointTLI = 0; } /* Check that the GUCs used to generate the WAL allow recovery */ @@ -6259,7 +6253,6 @@ SwitchIntoArchiveRecovery(XLogRecPtr EndRecPtr, TimeLineID replayTLI) } /* update local copy */ LocalMinRecoveryPoint = ControlFile->minRecoveryPoint; - LocalMinRecoveryPointTLI = ControlFile->minRecoveryPointTLI; /* * The startup process can update its local copy of minRecoveryPoint from @@ -7784,7 +7777,6 @@ CreateRestartPoint(int flags) /* update local copy */ LocalMinRecoveryPoint = ControlFile->minRecoveryPoint; - LocalMinRecoveryPointTLI = ControlFile->minRecoveryPointTLI; } if (flags & CHECKPOINT_IS_SHUTDOWN) ControlFile->state = DB_SHUTDOWNED_IN_RECOVERY; @@ -8600,7 +8592,6 @@ xlog_redo(XLogReaderState *record) if (InArchiveRecovery) { LocalMinRecoveryPoint = ControlFile->minRecoveryPoint; - LocalMinRecoveryPointTLI = ControlFile->minRecoveryPointTLI; } if (LocalMinRecoveryPoint != InvalidXLogRecPtr && LocalMinRecoveryPoint < lsn) { diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index af29a3b15f7..f399667e84a 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -368,8 +368,6 @@ static time_t AbortStartTime = 0; /* Length of said timeout */ #define SIGKILL_CHILDREN_AFTER_SECS 5 -static bool ReachedNormalRunning = false; /* T if we've reached PM_RUN */ - bool ClientAuthInProgress = false; /* T during new-client * authentication */ @@ -2334,7 +2332,6 @@ process_pm_child_exit(void) StartupStatus = STARTUP_NOT_RUNNING; FatalError = false; AbortStartTime = 0; - ReachedNormalRunning = true; UpdatePMState(PM_RUN); connsAllowed = true; diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c index 297b4dfa500..98a89965419 100644 --- a/src/bin/pg_dump/pg_dump_sort.c +++ b/src/bin/pg_dump/pg_dump_sort.c @@ -157,7 +157,6 @@ static const int dbObjectTypePriority[] = StaticAssertDecl(lengthof(dbObjectTypePriority) == NUM_DUMPABLE_OBJECT_TYPES, "array length mismatch"); -static DumpId preDataBoundId; static DumpId postDataBoundId; @@ -568,7 +567,6 @@ sortDumpableObjects(DumpableObject **objs, int numObjs, * Saving the boundary IDs in static variables is a bit grotty, but seems * better than adding them to parameter lists of subsidiary functions. */ - preDataBoundId = preBoundaryId; postDataBoundId = postBoundaryId; ordering = (DumpableObject **) pg_malloc(numObjs * sizeof(DumpableObject *)); diff --git a/src/test/modules/test_resowner/test_resowner_many.c b/src/test/modules/test_resowner/test_resowner_many.c index 1f64939404f..cb1505b440e 100644 --- a/src/test/modules/test_resowner/test_resowner_many.c +++ b/src/test/modules/test_resowner/test_resowner_many.c @@ -43,10 +43,9 @@ typedef struct } ManyTestResource; /* - * Current release phase, and priority of last call to the release callback. + * Priority of last call to the release callback. * This is used to check that the resources are released in correct order. */ -static ResourceReleasePhase current_release_phase; static uint32 last_release_priority = 0; /* prototypes for local functions */ @@ -272,18 +271,15 @@ test_resowner_many(PG_FUNCTION_ARGS) /* Start releasing */ elog(NOTICE, "releasing resources before locks"); - current_release_phase = RESOURCE_RELEASE_BEFORE_LOCKS; last_release_priority = 0; ResourceOwnerRelease(resowner, RESOURCE_RELEASE_BEFORE_LOCKS, false, false); Assert(GetTotalResourceCount(before_kinds, nkinds) == 0); elog(NOTICE, "releasing locks"); - current_release_phase = RESOURCE_RELEASE_LOCKS; last_release_priority = 0; ResourceOwnerRelease(resowner, RESOURCE_RELEASE_LOCKS, false, false); elog(NOTICE, "releasing resources after locks"); - current_release_phase = RESOURCE_RELEASE_AFTER_LOCKS; last_release_priority = 0; ResourceOwnerRelease(resowner, RESOURCE_RELEASE_AFTER_LOCKS, false, false); Assert(GetTotalResourceCount(before_kinds, nkinds) == 0);