Is my database done for?

From: Mark Nelson <mcn(at)cc(dot)usu(dot)edu>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Is my database done for?
Date: 2002-08-16 13:52:10
Message-ID: 3D5CD4F3@webmail.usu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

Let me explain what I've done and hopefully somebody out there can tell me to
either relax or continue panicking.

I'm running postgres on Red Hat 7.2 and after moving the server to a new
location, I rebooted the machine and noticed that the postgres server wasn't
working. When I tried psql, it said it couldn't because the postmaster wasn't
running. When I tried running the postmaster command, I got:

"postmaster does not know where to find the database system data. You must
specify the directory that contains the database system either by specifying
the -D invocation option or by setting the PGDATA environment variable."

I found the files in /var/lib/pgsql/data/ but when I tried to run the
postmaster, it would not allow me to do it because of the permissions set. I
switched to user postgres and reissued the command. This time it took. The
postmaster had to be run by user postgres because postgres owns the
directories and files in /var/lib/pgsql/.

Upon issuing the postmaster -D /var/lib/pgsql/data command:

"Found a pre-existing shared memory block (ID 131075) still in use.
If you're sure there are no old backends still running,
delete "/var/lib/pgsql/data/postmaster.pid"."

I wasn't aware of any processes running because I just started the machine and
it told me that postmaster wasn't working. So I removed postmaster.pid, and
then:

DEBUG: database system was interrupted at 2002-08-15 16:06:01 MDT
DEBUG: CheckPoint record at (0, 10393040)
DEBUG: Redo record at (0, 10393040); Undo record at (0, 0); Shutdown TRUE
DEBUG: NextTransactionId: 47382; NextOid: 36837
DEBUG: database system was not properly shut down; automatic recovery in
progress...
DEBUG: ReadRecord: record with zero len at (0, 10393104)
DEBUG: redo is not required
DEBUG: database system is in production state

and it has been like that for about 20 minutes. I have not been returned to a
prompt of any kind, it is just holding there. What does that mean? Is it
stuck? Is the data gone? Should I interrupt it or let it finish? How long
should I wake?

Advice, support, consolation all very welcome right now. :)
/mark

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2002-08-16 14:11:46 Re: Is my database done for?
Previous Message Bruno Wolff III 2002-08-16 12:40:22 Re: Limiting the result set