I read in the Postgres docs that the Smart Shutdown mode may be waiting for some sessions in the pg_stat_activity to finish. Ok, now the Centos service interface shows that the service has failed, due to some postmaster.pid lock file that the postmaster process uses, that's true, the file exists and the postmaster process is still running, the database cluster is still accessible. Oct 30 10:40:40 server systemd: rvice failed Oct 30 10:40:40 server systemd: Unit rvice entered failed state. It is one of the safeguards that are there to prevent you from starting two PostgreSQL servers on the same data directory, which would cause immediate data corruption. You should never manually delete postmaster.pid. Oct 30 10:40:40 server systemd: Failed to start PostgreSQL 10 database server. Delete Postmaster.pid file in postgres directory-postgresql. Oct 30 10:40:40 server systemd: rvice: main process exited, code=exited, status=1/FAILURE Oct 30 10:40:40 server postmaster: 10:40:40.431 GMT HINT: Is another postmaster (PID 8545) running in data directory "/var/lib/pgsql/10/data"? If it was created 1.5 years ago you either havent restarted PostgreSQL in a very long time, or the server was shut down ungracefully and wasnt started in a long time. Oct 30 10:40:40 server postmaster: 10:40:40.431 GMT FATAL: lock file "postmaster.pid" already exists Oct 30 10:40:40 server systemd: Starting PostgreSQL 10 database server. Main PID: 19359 (code=exited, status=1/FAILURE) Process: 19359 ExecStart=/usr/pgsql-10/bin/postmaster -D $ (code=exited, status=0/SUCCESS) Loaded: loaded (/usr/lib/systemd/system/rvice enabled vendor preset: disabled)Īctive: failed (Result: exit-code) since mar 10:40:40 GMT 12min ago Systemctl restart rvice didn't worked, when I execute systemctl status rvice this is shown: You should never manually delete postmaster.pid. Well my intention was to change the wal_level in the configuration from replica to logical, so I did, I changed it in the nf and tried to restart the service as the instructions in the nf said. This Database is a Master and it has 1 stand_by replica acting as a mirror. 1: Open your terminal You can find your terminal your applications folder, or use the launcher by clicking cmd + spacebar and search for 'terminal'. Postgres 10 database running on a Centos RHEL 7. The following tutorial will show you how to delete the postmaster.pid file so that you can restart your PostgreSQL service and run it as intended.
0 Comments
Leave a Reply. |