pg.ddx.io pgsql-performance@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Shea,Dan [CIS] <Dan.Shea@ec.gc.ca>
Cc: pgsql-performance@postgresql.org
Subject: Re: after using pg_resetxlog, db lost
Date: Tue, 22 Jun 2004 21:05:07 +0100
Message-ID: <40D890F3.8090208@archonet.com> (raw)
In-Reply-To: <21115.1087932963@sss.pgh.pa.us>
References: <644D07D3D59D8F408CD01AC2F833D8C62B9209@cisxa.cmc.int.ec.gc.ca>
<21115.1087932963@sss.pgh.pa.us>
Tom Lane wrote:
> "Shea,Dan [CIS]" <Dan.Shea@ec.gc.ca> writes:
>
>>The pg_resetxlog was run as root. It caused ownership problems of
>>pg_control and xlog files.
>>Now we have no access to the data now through psql. The data is still
>>there under /var/lib/pgsql/data/base/17347 (PWFPM_DEV DB name). But
>>there is no reference to 36 of our tables in pg_class. Also the 18
>>other tables that are reported in this database have no data in them.
>>Is there anyway to have the database resync or make it aware of the data
>>under /var/lib/pgsql/data/base/17347?
>>How can this problem be resolved?
>
>
> What this sounds like is that you reset the transaction counter along
> with the xlog, so that those tables appear to have been created by
> transactions "in the future". This could be repaired by doing
> pg_resetxlog with a more appropriate initial transaction ID, but
> figuring out what that value should be is not easy :-(
Tom - would there be any value in adding this to a pg_dump? I'm assuming
the numbers attached to tables etc are their OIDs anyway, so it might be
a useful reference in cases like this.
--
Richard Huxton
Archonet Ltd
view thread (9+ messages) latest in thread
Message-ID: <40D890F3.8090208@archonet.com> Permalink: ../40D890F3.8090208@archonet.com/ Also on: postgresql.org/message-id/40D890F3.8090208@archonet.com ·
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 using the --to and --cc options: reply via email To: pgsql-performance@postgresql.org Cc: dev@archonet.com, tgl@sss.pgh.pa.us, Dan.Shea@ec.gc.ca Subject: Re: after using pg_resetxlog, db lost In-Reply-To: <40D890F3.8090208@archonet.com> * 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