mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Rename "pg_xlog" directory to "pg_wal".
"xlog" is not a particularly clear abbreviation for "write-ahead log", and it sometimes confuses users into believe that the contents of the "pg_xlog" directory are not critical data, leading to unpleasant consequences. So, rename the directory to "pg_wal". This patch modifies pg_upgrade and pg_basebackup to understand both the old and new directory layouts; the former is necessary given the purpose of the tool, while the latter merely avoids an unnecessary backward-compatibility break. We may wish to consider renaming other programs, switches, and functions which still use the old "xlog" naming to also refer to "wal". However, that's still under discussion, so let's do just this much for now. Discussion: CAB7nPqTeC-8+zux8_-4ZD46V7YPwooeFxgndfsq5Rg8ibLVm1A@mail.gmail.com Michael Paquier
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
* If the primary server ends streaming, but doesn't disconnect, walreceiver
|
||||
* goes into "waiting" mode, and waits for the startup process to give new
|
||||
* instructions. The startup process will treat that the same as
|
||||
* disconnection, and will rescan the archive/pg_xlog directory. But when the
|
||||
* disconnection, and will rescan the archive/pg_wal directory. But when the
|
||||
* startup process wants to try streaming replication again, it will just
|
||||
* nudge the existing walreceiver process that's waiting, instead of launching
|
||||
* a new one.
|
||||
@@ -365,7 +365,7 @@ WalReceiverMain(void)
|
||||
* we've already reached the end of the old timeline, the server will
|
||||
* finish the streaming immediately, and we will go back to await
|
||||
* orders from the startup process. If recovery_target_timeline is
|
||||
* 'latest', the startup process will scan pg_xlog and find the new
|
||||
* 'latest', the startup process will scan pg_wal and find the new
|
||||
* history file, bump recovery target timeline, and ask us to restart
|
||||
* on the new timeline.
|
||||
*/
|
||||
@@ -742,7 +742,7 @@ WalRcvFetchTimeLineHistoryFiles(TimeLineID first, TimeLineID last)
|
||||
tli)));
|
||||
|
||||
/*
|
||||
* Write the file to pg_xlog.
|
||||
* Write the file to pg_wal.
|
||||
*/
|
||||
writeTimeLineHistoryFile(tli, content, len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user