Excerpts from Tom Lane's message of sáb jun 16 02:41:00 -0400 2012:
> Amit kapila <amit.kap...@huawei.com> writes:

> >  The suggested patch improves the logic to recover corrupt control file. So 
> > that is the reason I felt it will be relevant to do this patch.
> Well, we invented pg_resetxlog with the thought that it might be useful
> for such situations, but I'm not sure offhand that we've ever seen a
> field report of corrupted pg_control files.  For instance, a quick
> search in the archives for "incorrect checksum in control file" turns up
> only cases of pilot error, such as supposing that a 32-bit database
> could be used with a 64-bit server or vice versa.  Actual hardware
> failures on the pg_control file could be expected to result in something
> like "could not read from control file: I/O error", which I find no
> evidence for at all in the archives.

Hm, what about the situation where pg_control is lost completely to a
filesystem failure?  I remember doing disaster recovery on this problem
once ... As far as I recall the pg_xlog files were in a separate
partition so they weren't lost.  Some other files in the main data
partition were lost as well.  (I don't remember what is it that we had
to do to create a fake pg_control).

Maybe, even if Amit's code does not end up in pg_resetxlog, it could be
useful as a DR tool, assuming the code does not cause endless
maintenance burden.

Álvaro Herrera <alvhe...@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to