In this post, we will discuss the Cluster Database Layout of PostgreSQL.
The layout of database cluster has been shown below. Main files and subdirectories in a part of the document have been listed here:
In here, demo is a database cluster. Under the Database Cluster it has 6 files which are:
- pg_hba.conf: Used for PosgreSQL's client authentication.
- pg_ident.conf: Used for controlling PostgreSQL's user name mapping
- PG_VERSION: Containing version number of PostgreSQL
- postgresql.conf: Used for settin configuration parameters
- postgresql.auto.conf: In ALTER SYSTEM, it is stored configuration parameters.
- postmaster.opts: Record the last command line options for the server.
In here, demo has 17 directories which are:
- base: Subdirectory containing per-database subdirectories. A database is a subdirectory under the base subdirectory; and the database directory names are identical to the respective OIDs. For example, when the OID of the database is 16384, its subdirectory name is 16384.
- global: It contains cluster-wide tables, such as pg_database and pg_control.
- pg_commit_ts: Subdirectory containing transaction commit timestamp data. Version 9.5 or later.
- pg_dynshmem:Subdirectory containing files used by the dynamic shared memory subsystem. Version 9.4 or later.
- pg_logical:Subdirectory containing status data for logical decoding. Version 9.4 or later.
- pg_multixact:Subdirectory containing multitransaction status data (used for shared row locks)
- pg_notify:Subdirectory containing LISTEN/NOTIFY status data
- pg_replslot:Subdirectory containing replication slot data. Version 9.4 or later.
- pg_serial:Subdirectory containing information about committed serializable transactions (version 9.1 or later)
- pg_snapshots:Subdirectory containing exported snapshots (version 9.2 or later). The PostgreSQL's function pg_export_snapshot creates a snapshot information file in this subdirectory.
- pg_stat:Subdirectory containing permanent files for the statistics subsystem.
- pg_stat_tmp:Subdirectory containing temporary files for the statistics subsystem.
- pg_subtrans: Containing subtransaction status data
- pg_tblspc: Containing symbolic links to tablespaces
- pg_twophase: Containing state files for prepared transactions
- pg_wal: Containing WAL (Write Ahead Logging) segment files. It is renamed from pg_xlog in Version 10.
- pg_xact: Containing transaction commit state data. It is renamed from pg_clog in Version 10.
Top comments (0)