Re: Is my database done for?
От | douggorley@shaw.ca |
---|---|
Тема | Re: Is my database done for? |
Дата | |
Msg-id | a98e7002.7002a98e@shaw.ca обсуждение исходный текст |
Ответ на | Is my database done for? (Mark Nelson <mcn@cc.usu.edu>) |
Список | pgsql-novice |
From what you're saying, it sounds like you simply didn't run postmaster in the background. Try starting postmaster with the following command: /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 & (Adjust the paths to your particular system.) Doug Gorley | douggorley@shaw.ca ----- Original Message ----- From: Mark Nelson <mcn@cc.usu.edu> Date: Friday, August 16, 2002 6:52 am Subject: [NOVICE] Is my database done for? > 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 > > > > ---------------------------(end of broadcast)----------------------- > ---- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to > majordomo@postgresql.org)
В списке pgsql-novice по дате отправления: