Why is my test user DB missing so often?
I’ll leave my AWS instance stopped overnight and then restart it in the morning.
But then I’m not able to login w/ my jdtest
user account!
I keep getting the following in my system log
/var/lib/postgresql/log/postgresql-16-main.log
LOG: starting PostgreSQL 16.3 (Ubuntu 16.3-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit
LOG: listening on IPv4 address "0.0.0.0", port 5432
LOG: listening on IPv6 address "::", port 5432
LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
LOG: database system was shut down at 2024-06-06 15:42:30 UTC
LOG: database system is ready to accept connections
jdtest@jdtest FATAL: database "jdtest" does not exist
jdtest@jdtest FATAL: database "jdtest" does not exist
The only way I can fix this is to reissue:
CREATE USER jdtest createdb login PASSWORD 'jdtest' ;
CREATE DATABASE jdtest owner jdtest;
GRANT ALL PRIVILEGES ON DATABASE jdtest TO jdtest;
But then the same problem keeps happening. 🙁
Is this related to (impermanent??) tablespaces? Should I create some kind of (more permanent??) AWS datastore and an associated postgres tbs??