Re: Issue with Postgres process startup after instance restart

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shishir Joshi <shishir(dot)joshi(at)gojek(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Issue with Postgres process startup after instance restart
Date: 2020-03-27 14:00:49
Message-ID: 19774.1585317649@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Shishir Joshi <shishir(dot)joshi(at)gojek(dot)com> writes:
> I recently faced an issue with PG 11 where the VM that the PG process was
> running on got restarted because of a hardware issue. After the VM restart,
> the Postgres process failed to start on the 1st attempt with the error "*LOG:
> could not open directory "pg_tblspc/16388/PG_11_201809051": No such file
> or directory*" even though that directory was present. But on the 2nd
> attempt it started up without issues. There didn't seem to be any disk
> corruption issues and there were no other errors in the syslog either. Has
> anyone else faced such an issue or has any ideas on why this could have
> occurred?

Maybe whatever the tablespace is pointing at wasn't mounted yet?
Slow remote mounts are the bane of PG DBAs --- I can recall at least
one famous incident in which someone's database became totally
corrupt because the NFS mount it was on came up after server start,
leading to the server having a mishmash of files on the NFS server
and files on the local disk, now hidden underneath the mount point.

If this is what your issue was, you got very lucky to escape without
damage. Suggest adapting your PG server start script to make sure the
mounted file system is present before you allow the server to start.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2020-03-27 15:36:23 \COPY to accept non UTF-8 chars in CHAR columns
Previous Message Shishir Joshi 2020-03-27 11:10:41 Issue with Postgres process startup after instance restart