Commit aa8bd089 authored by Alvaro Herrera's avatar Alvaro Herrera

Revert "Avoid creating archive status ".ready" files too early"

This reverts commit 515e3d84a0b5 and equivalent commits in back
branches.  This solution to the problem has a number of problems, so
we'll try again with a different approach.

Per note from Andres Freund

Discussion: https://postgr.es/m/20210831042949.52eqp5xwbxgrfank@alap3.anarazel.de
parent 69d670e6
This diff is collapsed.
...@@ -248,13 +248,6 @@ WalWriterMain(void) ...@@ -248,13 +248,6 @@ WalWriterMain(void)
/* Process any signals received recently */ /* Process any signals received recently */
HandleWalWriterInterrupts(); HandleWalWriterInterrupts();
/*
* Notify the archiver of any WAL segments that are ready. We do this
* here to handle a race condition where WAL is flushed to disk prior
* to registering the segment boundary.
*/
NotifySegmentsReadyForArchive(GetFlushRecPtr());
/* /*
* Do what we're here for; then, if XLogBackgroundFlush() found useful * Do what we're here for; then, if XLogBackgroundFlush() found useful
* work to do, reset hibernation counter. * work to do, reset hibernation counter.
......
...@@ -349,7 +349,6 @@ extern XLogRecPtr GetInsertRecPtr(void); ...@@ -349,7 +349,6 @@ extern XLogRecPtr GetInsertRecPtr(void);
extern XLogRecPtr GetFlushRecPtr(void); extern XLogRecPtr GetFlushRecPtr(void);
extern XLogRecPtr GetLastImportantRecPtr(void); extern XLogRecPtr GetLastImportantRecPtr(void);
extern void RemovePromoteSignalFiles(void); extern void RemovePromoteSignalFiles(void);
extern void NotifySegmentsReadyForArchive(XLogRecPtr flushRecPtr);
extern bool PromoteIsTriggered(void); extern bool PromoteIsTriggered(void);
extern bool CheckPromoteSignal(void); extern bool CheckPromoteSignal(void);
......
...@@ -46,7 +46,6 @@ typedef uint64 XLogRecPtr; ...@@ -46,7 +46,6 @@ typedef uint64 XLogRecPtr;
* XLogSegNo - physical log file sequence number. * XLogSegNo - physical log file sequence number.
*/ */
typedef uint64 XLogSegNo; typedef uint64 XLogSegNo;
#define MaxXLogSegNo ((XLogSegNo) 0xFFFFFFFFFFFFFFFF)
/* /*
* TimeLineID (TLI) - identifies different database histories to prevent * TimeLineID (TLI) - identifies different database histories to prevent
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment