Re: FATAL 2: InitRelink(logfile 0 seg 173) failed: No such file or directory - Mailing list pgsql-hackers

From Tom Lane
Subject Re: FATAL 2: InitRelink(logfile 0 seg 173) failed: No such file or directory
Date
Msg-id 18747.1024323408@sss.pgh.pa.us
Whole thread Raw
In response to FATAL 2: InitRelink(logfile 0 seg 173) failed: No such file or directory  (james@unifiedmind.com (James Thornton))
Responses Re: FATAL 2: InitRelink(logfile 0 seg 173) failed: No such file or directory  (nield@usol.com)
List pgsql-hackers
james@unifiedmind.com (James Thornton) writes:
> What does this mean, and what could be causing it?
> FATAL 2: InitRelink(logfile 0 seg 173) failed: No such file or
> directory
> That's the second time in as many months that I have received this
> error when trying to start postmaster after a crash -- both times a
> server reboot remedied the issue.

That really should be impossible --- it says that a rename() failed for
a file we just created.

I judge from the spelling of the error message that you are running 7.1.
I would recommend an update to 7.2, wherein the error message looks
more like this:
   if (rename(tmppath, path) < 0)       elog(STOP, "rename from %s to %s (initialization of log file %u, segment %u)
failed:%m",            tmppath, path, log, seg);
 

(Alternatively, you could just edit the message in your existing sources
to include the actual source and destination pathnames given to rename()
--- it's in src/backend/access/transam/xlog.c, line 1396 in 7.1.3.)

That will allow us to eliminate the faint possibility that the code is
somehow miscomputing the pathnames occasionally.

However, given that you state a system reboot is necessary and
sufficient to make the problem go away, I am going to stick my neck
*way* out and suggest that:

1. You have the $PGDATA directory (or at least its pg_xlog subdirectory)  mounted via NFS.

2. This is an NFS problem.

In my book, no adequately-paranoid DBA will trust his database to NFS.
There are some cautionary tales in our mailing list archives...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Native OLE DB. What do you think about it
Next
From: Tom Lane
Date:
Subject: Re: FW: ALTER TABLE... OWNER bugette (repost)