Avoid redundant call to renameRecoveryFile().
Now that ArchiveRecoveryRequested is enabled, `exitArchiveRecovery()` does
`renameRecoveryFile()`. So, no need for additional call to the same under
`DB_IN_STANDBY_PROMOTED`, as it fails anyways since file doesn't exist.
@@ -6379,17 +6379,6 @@ StartupXLOG(void)
if (ArchiveRecoveryRequested)
exitArchiveRecovery(xlogreader->readPageTLI, endLogSegNo);
- /*
- * Recovery command file must be deleted during promotion to prevent
- * StartupXLOG from incorrectly concluding that we are still a standby.
- * This could happen if the promoted standby goes through a restart.
- */
- if (ControlFile->state == DB_IN_STANDBY_PROMOTED)
- {
- elog(LOG, "pg_control state is DB_IN_STANDBY_PROMOTED hence renaming recovery file");
- renameRecoveryFile();
- }
-
/*
* Prepare to write WAL starting at EndOfLog position, and init xlog
* buffer cache using the block containing the last record from the
