Received: from candle.pha.pa.us (pgman@nav-43.dsl.navpoint.com [162.33.245.46]) by hub.org (8.10.1/8.10.1) with ESMTP id e91KOip80761 for ; Sun, 1 Oct 2000 16:24:44 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id QAA16380; Sun, 1 Oct 2000 16:24:34 -0400 (EDT) From: Bruce Momjian Message-Id: <200010012024.QAA16380@candle.pha.pa.us> Subject: Re: pg_log deleted - what to do? In-Reply-To: <200010012014.QAA15871@candle.pha.pa.us> "from Bruce Momjian at Oct 1, 2000 04:14:25 pm" To: Bruce Momjian Date: Sun, 1 Oct 2000 16:24:34 -0400 (EDT) CC: Ralf Tschiersch , Peter Eisentraut , pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200010/11 Also, I never liked the name pg_log. Though descriptive, it was too tempting a name for administrators to delete. Write-ahead log will not use that file, so it should go away in 7.1. > OK, please try pg_dump or pg_dumpall. The database will not usable, but > may be backup-able. > > > > Hi - > > > > I've tried this already, with no success. More details: > > > > the "postgres"-database shows: > > > > postgres=> \d > > Couldn't find any tables, sequences or indices! > > > > postgres=> select * from pg_database; > > datname |datdba|encoding|datpath > > ----------+------+--------+---------- > > template1 | 26| 0|template1 > > (1 row) > > > > Whew - where are the databases? > > Connecting a (former) existing database shows: > > > > dbx1=> \d > > Couldn't find any tables, sequences or indices! > > dbx1=> select * from gp; > > kid|typ|var|data > > ---+---+---+---- > > (0 rows) > > > > But the File is there! > > > > -rw------- 1 postgres daemon 16384 Sep 30 03:46 data/base/dbx1/gp > > > > It's horrible. I know that I had to do a backup, but things change fast! > > Its seems that Postgres did a "reset" and does not know that there is > > pretty much it could deliver. Setting up a fres installation with the > > exact table and properties ist okay, but copying the > > data/base/dbname-Files into this new place does not the trick. > > > > Thanks for your care... > > > > Ralf > > > > > > > > On Sun, 1 Oct 2000, Bruce Momjian wrote: > > > > > Can the user rename the /data directory, do initdb, save the pg_log > > > file, move the old /data back into place, add the new pg_log, and do a > > > backup of his data? > > > > > > I thought this would work, but am not sure. > > > > > > > Ralf Tschiersch writes: > > > > > > > > > don't ask why, but what can I do if I have pg_log accidently deleted? How > > > > > to recover? the postmaster starts, I can connect do databases, but neiter > > > > > tables nor sequences are found! Postgres is 6.5.3 on linux 2.2.10. > > > > > > > > You have pretty much lost. Deleting pg_log is almost like deleting the > > > > data itself. You make backups, don't you? > > > > > > > > -- > > > > Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/ > > > > > > > > > > > > > > > > > -- > > > Bruce Momjian | http://candle.pha.pa.us > > > pgman@candle.pha.pa.us | (610) 853-3000 > > > + If your life is a hard drive, | 830 Blythe Avenue > > > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > > > > > > > > > > -- > Bruce Momjian | http://candle.pha.pa.us > pgman@candle.pha.pa.us | (610) 853-3000 > + If your life is a hard drive, | 830 Blythe Avenue > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026