Postgresql request did not complete, postgresql service does not start after restart

In my work, I was performing a complex query. I canceled it and returned home yesterday. This morning it was not possible to complete the work in the reverse request, also with the "terminate backend" functionality. My colleague restarted the host machine where the post-warms are installed. After the computer restarts, the postgres database does not start.

In my log files, I see an error:

'pg_ctl: an existing postmaster is running in this data directory'

I am not sure how to deal with this problem. I could try to fix this or try to extrapolate the data from the save files. What is the most logical step for you, and do you know how to fix it?

He used to give this error message:

2016-01-28 15:52:33 GMT FATAL: the lock file "postmaster.pid" already exists
     2016-01-28 15:52:33 GMT TIP: Is there another postmaster (PID 2100) in the data directory "C: /PostgreSQL/9.1/data "?

UPDATE ... I found the postmaster.pid file and deleted it. Now I restart the computer and hope that it starts.

UPDATE ... Now it works. I rebooted the computer and postgres immediately started working. Happy as a child, but at the same time not completely satisfied due to the following forum: https://superuser.com/questions/553045/fatal-lock-file-postmaster-pid-already-exists . It states that NEVER delete postmaster.pid due to possible data corruption. Therefore, because of this, I will backup all the databases that I have in postgres.

, - , . , , , , , - .

+4
2

. PostgreSQL postmaster.pid - , . PostgreSQL , postmaster.pid.

, -, PostgreSQL , postmaster.pid. , PostgreSQL, , .

. postmaster.pid , . , , , postmaster.pid, , PID .

+3

postgres

-2

Source: https://habr.com/ru/post/1626393/


All Articles