July 2019
Intermediate to advanced
502 pages
14h
English
For PostgreSQL, there is a data directory; this directory can be set using the PGDATA environment variable. By default, it is set to /var/lib/postgresql/data:
$ kubectl exec -it link-db-6b9b64db5-zp59g env | grep PGDATAPGDATA=/var/lib/postgresql/data
Let's take a look at what this directory contains:
$ kubectl exec -it link-db-6b9b64db5-zp59g ls /var/lib/postgresql/dataPG_VERSION pg_multixact pg_tblspcbase pg_notify pg_twophaseglobal pg_replslot pg_walpg_commit_ts pg_serial pg_xactpg_dynshmem pg_snapshots post-gresql.auto.confpg_hba.conf pg_stat postgresql.confpg_ident.conf pg_stat_tmp postmaster.optspg_logical pg_subtrans postmaster.pid
However, the data directory can be ephemeral or persistent depending ...