Postgres Start up Error

Started by Adarsh Sharmaalmost 15 years ago4 messagesgeneral
Jump to latest
#1Adarsh Sharma
adarsh.sharma@orkash.com

Dear all,

Today I by mistake deleted all the contents of pg_log & pg_xlog
directory and my Postgresql refuses to start due to the below error :-

2011-04-18 10:51:39 ISTLOG: database system was interrupted; last known
up at 2011-04-18 10:06:42 IST
2011-04-18 10:51:39 ISTLOG: could not open file
"pg_xlog/000000010000000600000007" (log file 6, segment 7): No such file
or directory
2011-04-18 10:51:39 ISTLOG: invalid primary checkpoint record
2011-04-18 10:51:39 ISTLOG: could not open file
"pg_xlog/0000000100000005000000C9" (log file 5, segment 201): No such
file or directory
2011-04-18 10:51:39 ISTLOG: invalid secondary checkpoint record
2011-04-18 10:51:39 ISTPANIC: could not locate a valid checkpoint record
2011-04-18 10:51:39 ISTLOG: startup process (PID 11021) was terminated
by signal 6: Aborted
2011-04-18 10:51:39 ISTLOG: aborting startup due to startup process failure

I try to reinstall with the same previous data directory, but it fails
again.

Any suggestions to solve it without losing the previous data.

Thanks & best Regards,
Adarsh Sharma

#2Chetan Suttraway
chetan.suttraway@enterprisedb.com
In reply to: Adarsh Sharma (#1)
Re: [GENERAL] Postgres Start up Error

On Mon, Apr 18, 2011 at 11:00 AM, Adarsh Sharma <adarsh.sharma@orkash.com>wrote:

Dear all,

Today I by mistake deleted all the contents of pg_log & pg_xlog directory
and my Postgresql refuses to start due to the below error :-

2011-04-18 10:51:39 ISTLOG: database system was interrupted; last known up
at 2011-04-18 10:06:42 IST
2011-04-18 10:51:39 ISTLOG: could not open file
"pg_xlog/000000010000000600000007" (log file 6, segment 7): No such file or
directory
2011-04-18 10:51:39 ISTLOG: invalid primary checkpoint record
2011-04-18 10:51:39 ISTLOG: could not open file
"pg_xlog/0000000100000005000000C9" (log file 5, segment 201): No such file
or directory
2011-04-18 10:51:39 ISTLOG: invalid secondary checkpoint record
2011-04-18 10:51:39 ISTPANIC: could not locate a valid checkpoint record
2011-04-18 10:51:39 ISTLOG: startup process (PID 11021) was terminated by
signal 6: Aborted
2011-04-18 10:51:39 ISTLOG: aborting startup due to startup process
failure

I try to reinstall with the same previous data directory, but it fails
again.

Any suggestions to solve it without losing the previous data.

Thanks & best Regards,
Adarsh Sharma

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

A quick search on message archives pointed to below link:
http://archives.postgresql.org/pgsql-admin/2000-10/msg00000.php
http://archives.postgresql.org/pgsql-admin/2002-04/msg00013.php
http://archives.postgresql.org/pgsql-bugs/2009-03/msg00118.php

Maybe someone here can point the exact steps to be followed.

--
Regards,
Chetan Suttraway
EnterpriseDB <http://www.enterprisedb.com/&gt;, The Enterprise
PostgreSQL<http://www.enterprisedb.com/&gt;
company.

#3Adarsh Sharma
adarsh.sharma@orkash.com
In reply to: Chetan Suttraway (#2)
Re: Postgres Start up Error

Thanks Chetan,

The problem is solved by the below command :- :-)

[postgres@ws-test 8.4SS]$ bin/pg_resetxlog -f
/hdd-1/PostgresPlus/8.4SS/data

Best Regards,
Adarsh Sharma

Chetan Suttraway wrote:

Show quoted text

On Mon, Apr 18, 2011 at 11:00 AM, Adarsh Sharma
<adarsh.sharma@orkash.com <mailto:adarsh.sharma@orkash.com>> wrote:

Dear all,

Today I by mistake deleted all the contents of pg_log & pg_xlog
directory and my Postgresql refuses to start due to the below error :-

2011-04-18 10:51:39 ISTLOG: database system was interrupted; last
known up at 2011-04-18 10:06:42 IST
2011-04-18 10:51:39 ISTLOG: could not open file
"pg_xlog/000000010000000600000007" (log file 6, segment 7): No
such file or directory
2011-04-18 10:51:39 ISTLOG: invalid primary checkpoint record
2011-04-18 10:51:39 ISTLOG: could not open file
"pg_xlog/0000000100000005000000C9" (log file 5, segment 201): No
such file or directory
2011-04-18 10:51:39 ISTLOG: invalid secondary checkpoint record
2011-04-18 10:51:39 ISTPANIC: could not locate a valid checkpoint
record
2011-04-18 10:51:39 ISTLOG: startup process (PID 11021) was
terminated by signal 6: Aborted
2011-04-18 10:51:39 ISTLOG: aborting startup due to startup
process failure

I try to reinstall with the same previous data directory, but it
fails again.

Any suggestions to solve it without losing the previous data.

Thanks & best Regards,
Adarsh Sharma

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org
<mailto:pgsql-general@postgresql.org>)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

A quick search on message archives pointed to below link:
http://archives.postgresql.org/pgsql-admin/2000-10/msg00000.php
http://archives.postgresql.org/pgsql-admin/2002-04/msg00013.php
http://archives.postgresql.org/pgsql-bugs/2009-03/msg00118.php

Maybe someone here can point the exact steps to be followed.

--
Regards,
Chetan Suttraway
EnterpriseDB <http://www.enterprisedb.com/&gt;, The Enterprise PostgreSQL
<http://www.enterprisedb.com/&gt; company.

#4Craig Ringer
craig@2ndquadrant.com
In reply to: Adarsh Sharma (#3)
Re: Postgres Start up Error

On 04/18/2011 04:01 PM, Adarsh Sharma wrote:

Thanks Chetan,

The problem is solved by the below command :-:-)

[postgres@ws-test 8.4SS]$ bin/pg_resetxlog -f /hdd-1/PostgresPlus/8.4SS/data

It's a really good idea to pg_dump, initdb, and restore after doing
that. You don't know your database is in a good state.

--
Craig Ringer