This topic describes the file storage of PolarDB-O.
- The data and WAL logs of the primary node and read-only nodes are stored in shared storage.
- The configuration files, log files, and temporary files are stored on each node.
- The commit log (clog) file of the primary node is stored in shared storage. The clog file of a read-only node is maintained on the read-only node.
- The pg_control file of the primary node is stored in shared storage. The pg_control file of a read-only node is read from the shared storage only when the database is started, and maintained in the memory after the database is started.
|Directory or file||Description||Storage path|
|base||The subdirectory of each database.||Shared storage|
|global||The directory of cluster-wide tables.|
|pg_tblspc||The table space.|
|pg_wal||The directory of write-ahead logging (WAL) logs.|
|pg_dynshmem||The file that is used by the dynamic shared memory.||One copy on each node|
|pg_snapshots||The exported snapshots.|
|pg_replslot||The replication slot data.|
|pg_stat_tmp||The temporary files for the statistics subsystem.|
|pg_stat||The persistent files for the statistics subsystem.|
|pg_serial||The information about committed serializable transactions.|
|pg_xact||The transaction log file.||
|pg_commit_ts||The time when the transaction is committed.|
|pg_multixact||The information about sub-transactions.|
|pg_version||The version information.||One copy on each node|
|postgresql.auto.conf||The parameter configuration file, which has a higher priority over the postgresql.conf file.|
|postmaster.opts||The file that records the database parameters that are specified before a server start.|
|postmaster.pid||A lock file that records information such as the process ID of postmaster, database directory, start time of postmaster, and port number.|
|postgresql.conf||The configuration file of parameters.|
|pg_hba.conf||The file that is used to control client authentication.|
|pg_ident.conf||The file that records mappings between the names of operating system users and database users.|