diff options
| author | Robert Haas | 2016-10-20 15:24:37 +0000 |
|---|---|---|
| committer | Robert Haas | 2016-10-20 15:32:18 +0000 |
| commit | f82ec32ac30ae7e3ec7c84067192535b2ff8ec0e (patch) | |
| tree | 929d4709a42149a4bbde12edad16183a96bcef6a /src/bin/initdb | |
| parent | ec7db2b483e0ff247ed41612cdb5716022401fe6 (diff) | |
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
Diffstat (limited to 'src/bin/initdb')
| -rw-r--r-- | src/bin/initdb/initdb.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 9e23f641308..c8a8c52c3d7 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -195,7 +195,7 @@ static const char *backend_options = "--single -F -O -j -c search_path=pg_catalo static const char *const subdirs[] = { "global", - "pg_xlog/archive_status", + "pg_wal/archive_status", "pg_clog", "pg_commit_ts", "pg_dynshmem", @@ -2091,8 +2091,6 @@ make_postgres(FILE *cmdfd) PG_CMD_PUTS(*line); } - - /* * signal handler in case we are interrupted. * @@ -2830,7 +2828,7 @@ create_xlog_or_symlink(void) char *subdirloc; /* form name of the place for the subdirectory or symlink */ - subdirloc = psprintf("%s/pg_xlog", pg_data); + subdirloc = psprintf("%s/pg_wal", pg_data); if (strcmp(xlog_dir, "") != 0) { @@ -2963,7 +2961,7 @@ initialize_data_directory(void) create_xlog_or_symlink(); - /* Create required subdirectories (other than pg_xlog) */ + /* Create required subdirectories (other than pg_wal) */ printf(_("creating subdirectories ... ")); fflush(stdout); @@ -3260,7 +3258,7 @@ main(int argc, char *argv[]) fputs(_("syncing data to disk ... "), stdout); fflush(stdout); - fsync_pgdata(pg_data, progname); + fsync_pgdata(pg_data, progname, PG_VERSION_NUM); check_ok(); return 0; } @@ -3326,7 +3324,7 @@ main(int argc, char *argv[]) { fputs(_("syncing data to disk ... "), stdout); fflush(stdout); - fsync_pgdata(pg_data, progname); + fsync_pgdata(pg_data, progname, PG_VERSION_NUM); check_ok(); } else |
