Skip site navigation (1) Skip section navigation (2)

Re: Postmaster crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Michael Beckstette" <mbeckste(at)TechFak(dot)Uni-Bielefeld(dot)DE>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Postmaster crash
Date: 2002-01-17 14:41:21
Message-ID: 23442.1011278481@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Michael Beckstette" <mbeckste(at)TechFak(dot)Uni-Bielefeld(dot)DE> writes:
> after several month of very stable operations now my postmaster crashes from
> time to time with the following errormessage:

> FATAL 2:  MoveOfflineLogs: cannot read xlog dir: Invalid argument

Hm, does that show up every five minutes, or just once in awhile?
That code will be invoked every five minutes (or however often you've
set checkpoints to be done).

This is coming from

    xldir = opendir(XLogDir);
    if (xldir == NULL)
        elog(STOP, "MoveOfflineLogs: cannot open xlog dir: %m");

in src/backend/access/transam/xlog.c.  XLogDir is a static variable that
shouldn't ever change after postmaster bootup; I wonder if it's getting
corrupted somehow?  You might try altering the elog call to include the
value of XLogDir so we can check:

        elog(STOP, "MoveOfflineLogs: cannot open xlog dir (%s): %m",
             XLogDir);

(7.2 already is coded that way, btw.)

Another question: what the heck does EINVAL mean for opendir, anyway?
The HPUX and Linux man pages for opendir don't list it as a possible
error code at all.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2002-01-17 22:14:16
Subject: Bug #562: create plpgsql language failed
Previous:From: Brent VernerDate: 2002-01-17 12:28:45
Subject: Re: COPY when 'filename' is a directory

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group