-
-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database disappears after pod restarts #444
Labels
bug
Something isn't working
Comments
I had the same problem with
The original file has a data_directory entry which seems to be used instead of PGDATA. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Describe the bug
Database disappears after pod restarts related to the issue with docker mounting here
https://datageek.blog/en/2020/06/17/disappearing-data-in-postgresql/
This always creates two mount points
postgres@supabase-database-0:/$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 100G 0 disk ├─nvme0n1p1 259:1 0 100G 0 part /var/lib/postgresql/data └─nvme0n1p128 259:2 0 1M 0 part nvme1n1 259:3 0 10G 0 disk nvme2n1 259:4 0 8G 0 disk /var/lib/postgresql
when a container or pod is restarted the database is not persisted as it is added to the container mount and not the host.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
When setting the PGDATA env variable to the recommended directory for postgres
PGDATA=/var/lib/postgresql/data/pgdata
(or any directory not/var/lib/postgresql/data
)get the following error2022-12-13 12:44:20.599 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.auto.conf" 2022-12-13 12:44:20.599 UTC [1] FATAL: "/var/lib/postgresql/data" is not a valid data directory 2022-12-13 12:44:20.599 UTC [1] DETAIL: File "/var/lib/postgresql/data/PG_VERSION" is missing.
example values from stateful set
The text was updated successfully, but these errors were encountered: