I'm handling a strange problem with one installation of PostgreSQL 10.4. One of the databases instances of PostgreSQL have stopped working after 7 months without issues. When this guy saw that the database wasn't respoding, tried to restart the database and de OS but it did'nt work.
So, I started to view the logs and found nothing, only the shutdown statements no postgresql_20190208.log
2019-02-08 16:24:07.749 -02 [12878] LOG: could not receive data from client: Connection reset by peer
2019-02-08 16:30:59.421 -02 [27180] LOG: received fast shutdown request
2019-02-08 16:30:59.422 -02 [27180] LOG: aborting any active transactions
2019-02-08 16:30:59.422 -02 [44204] FATAL: terminating connection due to administrator command
2019-02-08 16:30:59.422 -02 [13796] FATAL: terminating autovacuum process due to administrator command
2019-02-08 16:30:59.422 -02 [95589] FATAL: terminating connection due to administrator command
OK, when I have checked the startup.log I found:
2019-02-08 16:31:00.861 -02 [13815] FATAL: could not access file "": No such file or directory
2019-02-08 16:31:00.861 -02 [13815] LOG: database system is shut down
I have never seen this before. I would expect that the message shows me the file with problem or something that exposes some data corrupt, but and empty file address doesn't help that much.
So, I tried to startup the database by myself
postgres -D datadir/ -d 5 ;
2019-02-08 22:39:19.010 -02 [45971] DEBUG: postgres: PostmasterMain: initial environment dump:
[some envirounment variables]
2019-02-08 22:39:19.011 -02 [45971] DEBUG: registering background worker "logical replication launcher"
2019-02-08 22:39:19.011 -02 [45971] DEBUG: find_in_dynamic_libpath: trying "/banco/PostgreSQL/10/lib/postgresql/"
2019-02-08 22:39:19.011 -02 [45971] DEBUG: find_in_dynamic_libpath: trying "/banco/PostgreSQL/10/lib/postgresql/.so"
2019-02-08 22:39:19.011 -02 [45971] FATAL: could not access file "": No such file or directory
2019-02-08 22:39:19.011 -02 [45971] DEBUG: shmem_exit(1): 0 before_shmem_exit callbacks to make
2019-02-08 22:39:19.011 -02 [45971] DEBUG: shmem_exit(1): 0 on_shmem_exit callbacks to make
2019-02-08 22:39:19.011 -02 [45971] DEBUG: proc_exit(1): 1 callbacks to make
2019-02-08 22:39:19.011 -02 [45971] LOG: database system is shut down
2019-02-08 22:39:19.011 -02 [45971] DEBUG: exit(1)
2019-02-08 22:39:19.011 -02 [45971] DEBUG: shmem_exit(-1): 0 before_shmem_exit callbacks to make
2019-02-08 22:39:19.011 -02 [45971] DEBUG: shmem_exit(-1): 0 on_shmem_exit callbacks to make
2019-02-08 22:39:19.011 -02 [45971] DEBUG: proc_exit(-1): 0 callbacks to make
After seen that I have thought: May be the postgresql installation have corrupted. So, I have done a backup of data folder and run initdb command to test and it have worked.
Some of you have seen that happen? I'm trying another strategy that reinstall the entire postgres and just copy the data folder to see if it work. If it doesn't, I'll restore the yesterday backup
Have you guys know what may be the cause of it ?