pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Shishir Joshi <shishir.joshi@gojek.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Issue with Postgres process startup after instance restart
Date: Fri, 27 Mar 2020 10:00:49 -0400
Message-ID: <19774.1585317649@sss.pgh.pa.us> (raw)
In-Reply-To: <CACahDtrYrfDtOEuXCHQ-rnk4xv0SvVXBabHMSpwimewW3KUOzQ@mail.gmail.com>
References: <CACahDtrYrfDtOEuXCHQ-rnk4xv0SvVXBabHMSpwimewW3KUOzQ@mail.gmail.com>

Shishir Joshi <shishir.joshi@gojek.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





view thread (4+ messages)  latest in thread

Message-ID: <19774.1585317649@sss.pgh.pa.us>
Permalink:  ../19774.1585317649@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19774.1585317649@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, shishir.joshi@gojek.com
  Subject: Re: Issue with Postgres process startup after instance restart
  In-Reply-To: <19774.1585317649@sss.pgh.pa.us>
  References: <CACahDtrYrfDtOEuXCHQ-rnk4xv0SvVXBabHMSpwimewW3KUOzQ@mail.gmail.com> <19774.1585317649@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox