: Postgresql Error after recovery

Started by Venkat Balajialmost 14 years ago6 messagesgeneral
Jump to latest
#1Venkat Balaji
venkat.balaji@verse.in

Hello Community,

We have a critical situation where-in our production database server got
effected by "Root Kit".

When tried to build a replication site by copying the data directory to a
different server, so many files got missed while copying (this is due to
root kit effect).

So, we moved the missing files individually one-by-one and the situation
was a bit better.

We are struck with the following issue -

We are unable to connect to the databases, when we try to do so, we are
getting the below error -

postgres=# \c oltp_db
FATAL: index "pg_attribute_relid_attnum_index" contains unexpected zero
page at block 0
HINT: Please REINDEX it.
Previous connection kept

Can anyone please help us.

Regards,
VB

--

DISCLAIMER:

Please note that this message and any attachments may contain confidential
and proprietary material and information and are intended only for the use
of the intended recipient(s). If you are not the intended recipient, you
are hereby notified that any review, use, disclosure, dissemination,
distribution or copying of this message and any attachments is strictly
prohibited. If you have received this email in error, please immediately
notify the sender and delete this e-mail , whether electronic or printed.
Please also note that any views, opinions, conclusions or commitments
expressed in this message are those of the individual sender and do not
necessarily reflect the views of *Ver sé Innovation Pvt Ltd*.

#2Raghavendra
raghavendra.rao@enterprisedb.com
In reply to: Venkat Balaji (#1)
Re: : Postgresql Error after recovery

\
postgres=# \c oltp_db
FATAL: index "pg_attribute_relid_attnum_index" contains unexpected zero
page at block 0
HINT: Please REINDEX it.
Previous connection kept

Can anyone please help us.

You have HINT given to REINDEX it. Use reindexdb from OS.

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

#3Raghavendra
raghavendra.rao@enterprisedb.com
In reply to: Raghavendra (#2)
Re: : Postgresql Error after recovery

On Wed, Jul 4, 2012 at 2:11 PM, Raghavendra <
raghavendra.rao@enterprisedb.com> wrote:

\

postgres=# \c oltp_db
FATAL: index "pg_attribute_relid_attnum_index" contains unexpected zero
page at block 0
HINT: Please REINDEX it.
Previous connection kept

Can anyone please help us.

You have HINT given to REINDEX it. Use reindexdb from OS.

One more point, reindex the system catalog as "reindexdb -s"

--Raghav

#4Venkat Balaji
venkat.balaji@verse.in
In reply to: Raghavendra (#3)
Re: : Postgresql Error after recovery

On Wed, Jul 4, 2012 at 2:12 PM, Raghavendra <
raghavendra.rao@enterprisedb.com> wrote:

On Wed, Jul 4, 2012 at 2:11 PM, Raghavendra <
raghavendra.rao@enterprisedb.com> wrote:

\

postgres=# \c oltp_db
FATAL: index "pg_attribute_relid_attnum_index" contains unexpected
zero page at block 0
HINT: Please REINDEX it.
Previous connection kept

Can anyone please help us.

You have HINT given to REINDEX it. Use reindexdb from OS.

Re-index option did not work.

Single user mode option did not work as well -

[postgres@localhost bin]$ postgres --single oltp_db -E -D
/usr/local/postgresql-9.0.1/data
2012-07-04 04:30:47 CDT [26072]: [1-1] user=,db= FATAL: index
"pg_attribute_relid_attnum_index" contains unexpected zero page at block 0
2012-07-04 04:30:47 CDT [26072]: [2-1] user=,db= HINT: Please REINDEX it.

Last option would be dump and restore. We need to avoid that reduce the
downtime.

Regards,
Venkat

--

DISCLAIMER:

Please note that this message and any attachments may contain confidential
and proprietary material and information and are intended only for the use
of the intended recipient(s). If you are not the intended recipient, you
are hereby notified that any review, use, disclosure, dissemination,
distribution or copying of this message and any attachments is strictly
prohibited. If you have received this email in error, please immediately
notify the sender and delete this e-mail , whether electronic or printed.
Please also note that any views, opinions, conclusions or commitments
expressed in this message are those of the individual sender and do not
necessarily reflect the views of *Ver sé Innovation Pvt Ltd*.

#5Raghavendra
raghavendra.rao@enterprisedb.com
In reply to: Venkat Balaji (#4)
Re: : Postgresql Error after recovery

Re-index option did not work.

Single user mode option did not work as well -

[postgres@localhost bin]$ postgres --single oltp_db -E -D
/usr/local/postgresql-9.0.1/data
2012-07-04 04:30:47 CDT [26072]: [1-1] user=,db= FATAL: index
"pg_attribute_relid_attnum_index" contains unexpected zero page at block 0
2012-07-04 04:30:47 CDT [26072]: [2-1] user=,db= HINT: Please REINDEX it.

Last option would be dump and restore. We need to avoid that reduce the
downtime.

How about starting the instance with ignore_system_indexes=true ? And do
dump & restore. Am not sure on this procedure. Should someone here would
have better idea on this.

http://www.postgresql.org/docs/9.0/interactive/runtime-config-developer.html

---
Regards,
Raghavendra
EnterpriseDB Corporation
Blog: http://raghavt.blogspot.com/

#6Venkat Balaji
venkat.balaji@verse.in
In reply to: Raghavendra (#5)
Re: : Postgresql Error after recovery

I have restarted the cluster with "ignore_system_indexes=true" and was able
to connect to databases.

I have started re-indexing, seems to be working fine. Will get back if i
find further issues.

Regards,
Venkat

On Wed, Jul 4, 2012 at 3:35 PM, Raghavendra <
raghavendra.rao@enterprisedb.com> wrote:

Re-index option did not work.

Single user mode option did not work as well -

[postgres@localhost bin]$ postgres --single oltp_db -E -D
/usr/local/postgresql-9.0.1/data
2012-07-04 04:30:47 CDT [26072]: [1-1] user=,db= FATAL: index
"pg_attribute_relid_attnum_index" contains unexpected zero page at block 0
2012-07-04 04:30:47 CDT [26072]: [2-1] user=,db= HINT: Please REINDEX it.

Last option would be dump and restore. We need to avoid that reduce the
downtime.

How about starting the instance with ignore_system_indexes=true ? And do
dump & restore. Am not sure on this procedure. Should someone here would
have better idea on this.

http://www.postgresql.org/docs/9.0/interactive/runtime-config-developer.html

--

DISCLAIMER:

Please note that this message and any attachments may contain confidential
and proprietary material and information and are intended only for the use
of the intended recipient(s). If you are not the intended recipient, you
are hereby notified that any review, use, disclosure, dissemination,
distribution or copying of this message and any attachments is strictly
prohibited. If you have received this email in error, please immediately
notify the sender and delete this e-mail , whether electronic or printed.
Please also note that any views, opinions, conclusions or commitments
expressed in this message are those of the individual sender and do not
necessarily reflect the views of *Ver sé Innovation Pvt Ltd*.