Is my database done for?
От | Mark Nelson |
---|---|
Тема | Is my database done for? |
Дата | |
Msg-id | 3D5CD4F3@webmail.usu.edu обсуждение исходный текст |
Ответы |
Re: Is my database done for?
Re: Is my database done for? |
Список | 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
В списке pgsql-novice по дате отправления: