Re: Forgot to dump old data before re-installing machine

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Forgot to dump old data before re-installing machine
Date: 2008-01-18 21:45:54
Message-ID: Pine.GSO.4.64.0801181621320.5941@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

On Fri, 18 Jan 2008, Tom Lane wrote:

> pg_controldata already provides this information, no? At least barring
> the case of wrong-time_t-size, which we already know we want to fix.

It provides some of it, and I think you could make a case that the text
file format Dave suggested could be prototyped in an improved form by
combining the output from pg_controldata plus pg_config plus uname -a.

If people knew to save a copy of the output from those religiously into
the base of the database directory to aid possibly unrelated people who
have to restore that data later, that would be nice. In the cases I was
mentioning, people can't run pg_controldata until they have binaries
installed, and having a simple text file that contained the information
needed to do that right in the first place would give some guidance as to
get to that step.

You have to put yourself in the shoes of the person who has a database
backup and a crashed server to appreciate that anything that makes this
process easier is a huge help. Imagine that the previous DBA just quit
(nuking the server on his way out) and you have the kind of real-world
crisis people really run into. It would be nice if things progressed to
where, for example, someone could hand me a database backup I know nothing
about, I could look for this handy text file information in the base
directory, see:

CONFIGURE = '--build=i686-redhat-linux-gnu' ...
VERSION = PostgreSQL 8.2.5
Linux host.gregsmith.com 2.6.18-8.1.4.el5xen #1 SMP Thu May 17 05:27:09
EDT 2007 i686 i686 i386 GNU/Linux

And now I've got a real good idea what binary this dump came from and how
to get the instance back up and running in a few seconds of work. Maybe
it's a suggested best-practice for now to save such a thing, maybe it gets
included as an automatic feature at initdb time in 8.4, but I think it's a
worthwhile idea to work toward helping people with.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gordan Bobic 2008-01-18 21:53:23 Re: Replication Using Triggers
Previous Message Erik Jones 2008-01-18 21:32:13 Re: WARNINGs after starting backup server created with PITR

Browse pgsql-patches by date

  From Date Subject
Next Message Greg Sabino Mullane 2008-01-20 17:56:30 Friendly help for psql
Previous Message Tom Lane 2008-01-18 21:14:51 Re: Forgot to dump old data before re-installing machine