From 88e66d193fbaf756b3cc9bf94cad116aacbb355b Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Fri, 17 Mar 2017 09:46:58 -0400 Subject: Rename "pg_clog" directory to "pg_xact". 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 --- doc/src/sgml/backup.sgml | 4 ++-- doc/src/sgml/catalogs.sgml | 4 ++-- doc/src/sgml/config.sgml | 2 +- doc/src/sgml/func.sgml | 2 +- doc/src/sgml/maintenance.sgml | 8 ++++---- doc/src/sgml/ref/pg_resetwal.sgml | 4 ++-- doc/src/sgml/ref/pg_rewind.sgml | 2 +- doc/src/sgml/storage.sgml | 10 +++++----- doc/src/sgml/wal.sgml | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 69c599e1803..12f2efe4e2a 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -382,10 +382,10 @@ tar -cf backup.tar /usr/local/pgsql/data directories. This will not work because the information contained in these files is not usable without the commit log files, - pg_clog/*, which contain the commit status of + pg_xact/*, which contain the commit status of all transactions. A table file is only usable with this information. Of course it is also impossible to restore only a - table and the associated pg_clog data + table and the associated pg_xact data because that would render all other tables in the database cluster useless. So file system backups only work for complete backup and restoration of an entire database cluster. diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 2c2da2ad8a8..df0435c3f00 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -1893,7 +1893,7 @@ All transaction IDs before this one have been replaced with a permanent (frozen) transaction ID in this table. This is used to track whether the table needs to be vacuumed in order to prevent transaction - ID wraparound or to allow pg_clog to be shrunk. Zero + ID wraparound or to allow pg_xact to be shrunk. Zero (InvalidTransactionId) if the relation is not a table. @@ -2570,7 +2570,7 @@ All transaction IDs before this one have been replaced with a permanent (frozen) transaction ID in this database. This is used to track whether the database needs to be vacuumed in order to prevent - transaction ID wraparound or to allow pg_clog to be shrunk. + transaction ID wraparound or to allow pg_xact to be shrunk. It is the minimum of the per-table pg_class.relfrozenxid values. diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index b6daf9677cb..9963cd61a19 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -6004,7 +6004,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; Vacuum also allows removal of old files from the - pg_clog subdirectory, which is why the default + pg_xact subdirectory, which is why the default is a relatively low 200 million transactions. This parameter can only be set at server start, but the setting can be reduced for individual tables by diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 502f99b22b3..9408a255dc6 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -15616,7 +15616,7 @@ SELECT * FROM pg_ls_dir('.') WITH ORDINALITY AS t(ls,n); postmaster.pid | 9 pg_ident.conf | 10 global | 11 - pg_clog | 12 + pg_xact | 12 pg_snapshots | 13 pg_multixact | 14 PG_VERSION | 15 diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml index f87f3e00de5..65a64c85ec0 100644 --- a/doc/src/sgml/maintenance.sgml +++ b/doc/src/sgml/maintenance.sgml @@ -527,18 +527,18 @@ The sole disadvantage of increasing autovacuum_freeze_max_age (and vacuum_freeze_table_age along with it) - is that the pg_clog subdirectory of the database cluster + is that the pg_xact subdirectory of the database cluster will take more space, because it must store the commit status of all transactions back to the autovacuum_freeze_max_age horizon. The commit status uses two bits per transaction, so if autovacuum_freeze_max_age is set to its maximum allowed - value of two billion, pg_clog can be expected to + value of two billion, pg_xact can be expected to grow to about half a gigabyte. If this is trivial compared to your total database size, setting autovacuum_freeze_max_age to its maximum allowed value is recommended. Otherwise, set it depending - on what you are willing to allow for pg_clog storage. + on what you are willing to allow for pg_xact storage. (The default, 200 million transactions, translates to about 50MB of - pg_clog storage.) + pg_xact storage.) diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml index 0cc6fb4c4db..0d93b56ddd2 100644 --- a/doc/src/sgml/ref/pg_resetwal.sgml +++ b/doc/src/sgml/ref/pg_resetwal.sgml @@ -256,12 +256,12 @@ PostgreSQL documentation A safe value can be determined by looking for the numerically largest - file name in the directory pg_clog under the data directory, + file name in the directory pg_xact under the data directory, adding one, and then multiplying by 1048576 (0x100000). Note that the file names are in hexadecimal. It is usually easiest to specify the option value in hexadecimal too. For example, if 0011 is the largest entry - in pg_clog, -x 0x1200000 will work (five + in pg_xact, -x 0x1200000 will work (five trailing zeroes provide the proper multiplier). diff --git a/doc/src/sgml/ref/pg_rewind.sgml b/doc/src/sgml/ref/pg_rewind.sgml index 371c4a475f6..d5430d43245 100644 --- a/doc/src/sgml/ref/pg_rewind.sgml +++ b/doc/src/sgml/ref/pg_rewind.sgml @@ -229,7 +229,7 @@ PostgreSQL documentation - Copy all other files such as pg_clog and + Copy all other files such as pg_xact and configuration files from the source cluster to the target cluster (everything except the relation files). diff --git a/doc/src/sgml/storage.sgml b/doc/src/sgml/storage.sgml index e0a89861f86..a156693ec84 100644 --- a/doc/src/sgml/storage.sgml +++ b/doc/src/sgml/storage.sgml @@ -77,11 +77,6 @@ Item Subdirectory containing transaction commit timestamp data - - pg_clog - Subdirectory containing transaction commit status data - - pg_dynshmem Subdirectory containing files used by the dynamic shared memory @@ -151,6 +146,11 @@ Item Subdirectory containing WAL (Write Ahead Log) files + + pg_xact + Subdirectory containing transaction commit status data + + postgresql.auto.conf A file used for storing configuration parameters that are set by diff --git a/doc/src/sgml/wal.sgml b/doc/src/sgml/wal.sgml index 1468ba52a48..a749b83dc0e 100644 --- a/doc/src/sgml/wal.sgml +++ b/doc/src/sgml/wal.sgml @@ -201,7 +201,7 @@ - Internal data structures such as pg_clog, pg_subtrans, pg_multixact, + Internal data structures such as pg_xact, pg_subtrans, pg_multixact, pg_serial, pg_notify, pg_stat, pg_snapshots are not directly checksummed, nor are pages protected by full page writes. However, where such data structures are persistent, WAL records are written that allow -- cgit v1.2.3