Label
PostgreSQL , 10.0 , pg_xact , pg_wal , log , pg_clog , pg_xlog , pg_log
background
10.0 renamed several directories with certain ambiguities. They are respectively
pg_xlog, pg_clog, pg_log
Renamed
pg_wal, pg_xact, log
They correspond to WAL (write ahead log) log, transaction status log and log respectively.
It saves people from deleting the files in the LOG directory by mistake. It really happened.
The disadvantage is that if the corresponding program uses these directory names, it needs to be modified.
Corresponding patch
Rename "pg_xlog" directory to "pg_wal". author Robert Haas <rhaas@postgresql.org> Thu, 20 Oct 2016 23:24:37 +0800 (11:24 -0400) committer Robert Haas <rhaas@postgresql.org> Thu, 20 Oct 2016 23:32:18 +0800 (11:32 -0400) "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
Rename "pg_clog" directory to "pg_xact". author Robert Haas <rhaas@postgresql.org> Fri, 17 Mar 2017 21:46:58 +0800 (09:46 -0400) committer Robert Haas <rhaas@postgresql.org> Fri, 17 Mar 2017 21:48:38 +0800 (09:48 -0400) Names containing the letters "log" sometimes confuse users into believing that only non-critical data is present. It is hoped this renaming will discourage ill-considered removals of transaction status data. Michael Paquier Discussion: http://postgr.es/m/CA+Tgmoa9xFQyjRZupbdEFuwUerFTvC6HjZq1ud6GYragGDFFgA@mail.gmail.com
Change default of log_directory to 'log' author Peter Eisentraut <peter_e@gmx.net> Mon, 27 Mar 2017 22:34:33 +0800 (10:34 -0400) committer Peter Eisentraut <peter_e@gmx.net> Mon, 27 Mar 2017 22:34:33 +0800 (10:34 -0400) The previous default 'pg_log' might have indicated by its "pg_" prefix that it is an internal system directory. The new default is more in line with the typical naming of directories with user-facing log files. Together with the renaming of pg_clog and pg_xlog, this should clear up that difference. Author: Andreas Karlsson <andreas@proxel.se>
For this discussion of patch, see Mail Group, URL at the end of this article.
PostgreSQL community style is very rigorous, a patch may be discussed in the mail group for several months or even years, according to your opinion repeated amendments, patch merged into master is very mature, so the stability of PostgreSQL is well known.