Skip to content

Commit 2ffdc56

Browse files
committed
fix: rephrase the Postgres PGDATA documentation and add a warning
The content of this PR should be self-explaining. Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
1 parent b0b604e commit 2ffdc56

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

postgres/content.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ See the PostgreSQL documentation on [`pg_hba.conf`](https://www.postgresql.org/d
9696

9797
### `PGDATA`
9898

99-
This optional variable can be used to define another location - like a subdirectory - for the database files. The default is `/var/lib/postgresql/data`. If the data volume you're using is a filesystem mountpoint (like with GCE persistent disks) or remote folder that cannot be chowned to the `postgres` user (like some NFS mounts), Postgres `initdb` recommends a subdirectory be created to contain the data.
99+
> **Important Note:** when mounting a volume to `/var/lib/posgresql`, the `/var/lib/postgresql/data` path is a local volume from the container runtime, thus data is not persisted on the mounted volume.
100+
101+
This optional variable can be used to define another location - like a subdirectory - for the database files. The default is `/var/lib/postgresql/data`. If the data volume you're using is a filesystem mountpoint (like with GCE persistent disks), or remote folder that cannot be chowned to the `postgres` user (like some NFS mounts), or contains folders/files (e.g. `lost+found`), Postgres `initdb` requires a subdirectory to be created within the mountpoint to contain the data.
102+
100103

101104
For example:
102105

0 commit comments

Comments
 (0)