Thread: DB & Log Files removed...

DB & Log Files removed...

From
Lynn.Tilby@asu.edu
Date:
I am running an experimental system, my disk filled up when running a
table build from a query. I mistakenly blew away the files in
../pgsql/data/base/18773 & ../pgsql/data/pg_xlog with NO BU!
Recover is only bringing back 8 of about 90 files.

I can rebuild the DB from scratch relatively easily...

I was going to try and just do a drop database but I get this when
trying to bring up the postmaster.

[postgres@polaris pgsql]$ postmaster
DEBUG:  database system shutdown was interrupted at 2003-12-17 12:32:40 MST
DEBUG:  open(logfile 6 seg 134) failed: No such file or directory
DEBUG:  Invalid primary checkPoint record
DEBUG:  open(logfile 6 seg 134) failed: No such file or directory
DEBUG:  Invalid secondary checkPoint record
FATAL 2:  Unable to locate a valid CheckPoint record
postmaster: Startup proc 18179 exited with status 512 - abort

Where is the postmaster getting the 'logfile 6 seg 134' from?  Are there
any files I can edit to solve this problem, or perhaps something else
I can do?

I am running RH 6.2 with pgsql 7.1.3 I thought of just reinstalling 7.1.3
for the time being but I only see 7.1.3 for RH 7.1 available on the
download site.  If I am unable to just rebuild the DB is there an archive
somewhere that I can download 7.1.3 for RH6.2 from or... would I be OK
with the RH7.1 version on an RH6.2 box?  My gut feel is that this would
not work. (... i know... it's time to upgrade)

Thanks,
Lynn

Re: DB & Log Files removed...

From
Tom Lane
Date:
Lynn.Tilby@asu.edu writes:
> Where is the postmaster getting the 'logfile 6 seg 134' from?

Those are your missing pg_xlog files.  I'd suggest running pg_resetxlog
(not standard in 7.1, but I believe it exists as a contrib item).  Won't
get you out of the one lost database, but at least you'll be able to
start the postmaster.

            regards, tom lane