Обсуждение: Help. Pg not running
Dear All, I'm sorry, I'm a beginer in PostgreSQL. I have problem with my PostgreSQL after my server un complete shutdown. When i want to run postmaster there some error massage and postmaster can't run. this is the massage : DEBUG: database system was interrupted at 2003-06-28 02:41:38 JAVT DEBUG: open(logfile 0 seg 0) failed: No such file or directory DEBUG: Invalid primary checkPoint record DEBUG: open(logfile 0 seg 0) failed: No such file or directory DEBUG: Invalid secondary checkPoint record FATAL 2: Unable to locate a valid CheckPoint record /usr/local/pgsql/bin/postmaster: Startup proc 1747 exited with status 512 - abort What i must to do to fixing this problem ? Thank's a lot.
On Mon, 30 Jun 2003, Asidha Luhwidyanto wrote: > Dear All, > > I'm sorry, I'm a beginer in PostgreSQL. > > I have problem with my PostgreSQL after my server un complete shutdown. > When i want to run postmaster there some error massage and postmaster can't > run. > > this is the massage : > > DEBUG: database system was interrupted at 2003-06-28 02:41:38 JAVT > DEBUG: open(logfile 0 seg 0) failed: No such file or directory > DEBUG: Invalid primary checkPoint record > DEBUG: open(logfile 0 seg 0) failed: No such file or directory > DEBUG: Invalid secondary checkPoint record > FATAL 2: Unable to locate a valid CheckPoint record > /usr/local/pgsql/bin/postmaster: Startup proc 1747 exited with status 512 - > abort What exactly led to this? It sounds like some files got deleted out from underneath postgresql, specifically the pg_clog and pg_xlog directories. How exactly was the server shutdown? It may be a little hard to get the hackers in on this right away, as they're rushing to feature freeze of 1 July 2003...
On Mon, 30 Jun 2003, Asidha Luhwidyanto wrote: > Dear All, > > I'm sorry, I'm a beginer in PostgreSQL. > > I have problem with my PostgreSQL after my server un complete shutdown. > When i want to run postmaster there some error massage and postmaster can't > run. > > this is the massage : > <SNIP ERRORS> > > What i must to do to fixing this problem ? This is exactly what happened to me before - the WAL (write-ahead-logs) or xlogs have become corrupt, or more like;ythe pg_control file got wiped. What you need to do is: 1) backup your xlogs and pg_control, just in case. 2) touch to make an empty pg_control 3) read the manpage on pg_resetxlog - figure out the correct transaction id and other values, and run the program. Possibly backup the entire DB directory structure, just in case. 4) Trial and error (possibly) until you get the server to start again. Then do *nothing* until you have dumped the db to a file, and cleanly resotred from it. You should also manually check for inconsistencies, although if you have correctly used contraints it should barf on input if there are any. Assuming your DB is fully normalised. Hope that helps -- Sam Barnett-Cormack Software Developer | Student of Physics & Maths UK Mirror Service (http://www.mirror.ac.uk) | Lancaster University
Thank's I have trying to restarting pg and copying xlogs file from the last backup. Until some trial and error, it working. DEBUG: database system was interrupted at 2003-06-28 02:41:38 JAVT DEBUG: CheckPoint record at (0, 12369592) DEBUG: Redo record at (0, 12369592); Undo record at (0, 0); Shutdown FALSE DEBUG: NextTransactionId: 14017; NextOid: 32252 DEBUG: database system was not properly shut down; automatic recovery in progress... DEBUG: ReadRecord: record with zero len at (0, 12369656) DEBUG: redo is not required DEBUG: database system is in production state And now i can backup all db. I will upgrade my last 7.12 version to 7.3. Maybe i need to use extended 3 for my linux filesystem and installing UPS for protecting my PG server. Thank's Sam Barnet & Scott Marlowe for your guid. Asidha Luhwidyanto -------------------- http://dijogja.com/ for information of Jogja-Java-Indonesia > On Mon, 30 Jun 2003, Asidha Luhwidyanto wrote: > >> Dear All, >> >> I'm sorry, I'm a beginer in PostgreSQL. >> >> I have problem with my PostgreSQL after my server un complete >> shutdown. When i want to run postmaster there some error massage and >> postmaster can't run. >> >> this is the massage : >> > <SNIP ERRORS> >> >> What i must to do to fixing this problem ? > > This is exactly what happened to me before - the WAL (write-ahead-logs) > or xlogs have become corrupt, or more like;ythe pg_control file got > wiped. What you need to do is: > > 1) backup your xlogs and pg_control, just in case. > > 2) touch to make an empty pg_control > > 3) read the manpage on pg_resetxlog - figure out the correct > transaction id and other values, and run the program. Possibly backup > the entire DB directory structure, just in case. > > 4) Trial and error (possibly) until you get the server to start again. > Then do *nothing* until you have dumped the db to a file, and cleanly > resotred from it. You should also manually check for inconsistencies, > although if you have correctly used contraints it should barf on input > if there are any. Assuming your DB is fully normalised. > > Hope that helps > > -- > > Sam Barnett-Cormack > Software Developer | Student of Physics & > Maths UK Mirror Service (http://www.mirror.ac.uk) | Lancaster > University > > ---------------------------(end of > broadcast)--------------------------- TIP 1: subscribe and unsubscribe > commands go to majordomo@postgresql.org
On Mon, 30 Jun 2003, Asidha Luhwidyanto wrote: > And now i can backup all db. I will upgrade my last 7.12 version to 7.3. > Maybe i need to use extended 3 for my linux filesystem and installing UPS > for protecting my PG server. Don't forget that the database has to be re-inited between versions - best to do a dump, backup the data dir just in case, and then start with a fresh empty data dir to import to. > > On Mon, 30 Jun 2003, Asidha Luhwidyanto wrote: > > > >> Dear All, > >> > >> I'm sorry, I'm a beginer in PostgreSQL. > >> > >> I have problem with my PostgreSQL after my server un complete > >> shutdown. When i want to run postmaster there some error massage and > >> postmaster can't run. > >> > >> this is the massage : > >> > > <SNIP ERRORS> > >> > >> What i must to do to fixing this problem ? > > > > This is exactly what happened to me before - the WAL (write-ahead-logs) > > or xlogs have become corrupt, or more like;ythe pg_control file got > > wiped. What you need to do is: > > > > 1) backup your xlogs and pg_control, just in case. > > > > 2) touch to make an empty pg_control > > > > 3) read the manpage on pg_resetxlog - figure out the correct > > transaction id and other values, and run the program. Possibly backup > > the entire DB directory structure, just in case. > > > > 4) Trial and error (possibly) until you get the server to start again. > > Then do *nothing* until you have dumped the db to a file, and cleanly > > resotred from it. You should also manually check for inconsistencies, > > although if you have correctly used contraints it should barf on input > > if there are any. Assuming your DB is fully normalised. > > > > Hope that helps > > > > -- > > > > Sam Barnett-Cormack > > Software Developer | Student of Physics & > > Maths UK Mirror Service (http://www.mirror.ac.uk) | Lancaster > > University > > > > ---------------------------(end of > > broadcast)--------------------------- TIP 1: subscribe and unsubscribe > > commands go to majordomo@postgresql.org > > -- Sam Barnett-Cormack Software Developer | Student of Physics & Maths UK Mirror Service (http://www.mirror.ac.uk) | Lancaster University