pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: HOWARD,EDWARD T,III <ETHoward@mail.ifas.ufl.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: Postgresql global directory
Date: Tue, 21 Dec 2004 14:21:21 -0500
Message-ID: <24923.1103656881@sss.pgh.pa.us> (raw)
In-Reply-To: <BCF98ACE92CF144A84216E0AC99D271C23E91D@if-srv-exchbe01.ad.ufl.edu>
References: <BCF98ACE92CF144A84216E0AC99D271C23E91D@if-srv-exchbe01.ad.ufl.edu>

"HOWARD,EDWARD T,III" <ETHoward@mail.ifas.ufl.edu> writes:
> 	I have a doozy of a problem.  Had a dataserver crash hard (it
> was hacked and the root kit used broke a lot of files), this happened
> after a motherboard went on my backup server, corrupting my backup set.
> We have gotten most of the data recovered, however the control files.
> Pg_control, x_log, c_log, and the entire global directory has been
> dumped into lost+found.

Yipes.  I'm afraid you're very possibly screwed :-(.  It would not be
hard to identify pg_control and the pg_xlog files by size and content,
and with sufficient determination you might do the same for all the
files in global/, but there's no real good way to tell one pg_clog
file from another.

However there is a glimmer of hope: there very possibly *is* only one
pg_clog file, if you had a not-too-high-volume server and you'd been
keeping it vacuumed religiously.  If so then (in principle) you can
identify all the files and put them back.

> So my question is this.  Does anybody know how to create a new global
> directory using an existing data set (that was not created by dump)?

You will not get a useful solution that way.  The files are too
interdependent, you can't plug in files from another installation
without breaking things.  What you've got to do is reassemble the jigsaw
puzzle by putting each file back in its proper place.

What I'd suggest is that you make a temporary installation in another
place with a fresh initdb and load your latest available backup into it
(you do have *some* backup I trust).  That will give you a reference to
compare to as you try to identify the files.

			regards, tom lane



view thread (2+ messages)

Message-ID: <24923.1103656881@sss.pgh.pa.us>
Permalink:  ../24923.1103656881@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24923.1103656881@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, ETHoward@mail.ifas.ufl.edu
  Subject: Re: Postgresql global directory
  In-Reply-To: <24923.1103656881@sss.pgh.pa.us>
  References: <BCF98ACE92CF144A84216E0AC99D271C23E91D@if-srv-exchbe01.ad.ufl.edu> <24923.1103656881@sss.pgh.pa.us>

* 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