pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Eade <seade@backstagetech.com.au>
To: pgsql-admin@postgresql.org
Subject: Searching for a supposedly resolved bug report
Date: Wed, 21 Sep 2005 16:47:02 +1000
Message-ID: <433101E6.9080900@backstagetech.com.au> (raw)

Environment: PostgreSQL 7.3.10-RH, RHEL3

As a result of a failed pg_restore (why it failed will be the subject of
another post) I ended up with a corrupted database (since dropped).

Somehow this resulted in postmaster crashing thus:

    PANIC: open of /var/lib/pgsql/data/pg_clog/0058 failed: No such file
or directory

Sure enough this file does not exist, the file in the pg_clog dir is
0060 (180224 bytes)

I mentioned this on the postgres irc channel, I have included the advice
provided by neilc below:

I am wondering if anyone can point me to the supposedly fixed bug that
would have caused this (is it just me or is it difficult to find
specific bugs using the mailing list - is there an issue tracker
somewhere?)  It would be nice to know how to avoid this in the future.

I am also interested in comments on the suggested solution.  I won't be
able to upgrade to a newer release for a couple of weeks, and then it
will only be to 7.4.x.  Is the suggested solution going to allow me to
continue using the databases (i.e. moving forward past the ability to
run a dump).

Thanks in advance for any comments.

Scott


=== Edited irc transcript below ===

neilc> hmm, i thought the fix for this was backported to 7.3.10
> but perhaps not in any case, this is a fairly serious bug
> that has been fixed in recent PG releases so i would
> recommend upgrading (e.g. to 8.0.3) once you've fixed the
> problem
> to fix the problem (i.e.allow pg_dump so you can upgrade),
> recreate the clog files
> they should be all-zeroes
> so use dd if=/dev/zero of=/the/file/in/clog
> the length should be a multiple of 8192
> basically, create a zero-length file
> PG will then complain it can't find any data at a particular offset
> then extend the file (with all-zeroes) to the offset PG complains
> about

Worryingly, someone else commented
> i'm thinking it could be prefaced with WARNING! YOU ARE ABOUT TO
DESTROY DATA! THIS IS THE LAST RESORT!

seade> I assume I need to drop postmaster before I do the
seade> dd if=/dev/zero of=/the/file/in/clog?
seade> what about the filename 0060 will this be tidied up
seade> too on restart?
neilc> seade: yeah, stop the postmaster first
neilc> seade: the filename is fine





view thread (2+ messages)  latest in thread

Message-ID: <433101E6.9080900@backstagetech.com.au>
Permalink:  ../433101E6.9080900@backstagetech.com.au/
Also on:    postgresql.org/message-id/433101E6.9080900@backstagetech.com.au

 · 

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-admin@postgresql.org
  Cc: seade@backstagetech.com.au
  Subject: Re: Searching for a supposedly resolved bug report
  In-Reply-To: <433101E6.9080900@backstagetech.com.au>
  References: <433101E6.9080900@backstagetech.com.au>

* 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