[GENERAL] : Postgresql Error after recovery

2012-07-04 Thread Venkat Balaji
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*.



Re: [GENERAL] : Postgresql Error after recovery

2012-07-04 Thread Raghavendra

 \
 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/


Re: [GENERAL] : Postgresql Error after recovery

2012-07-04 Thread Raghavendra
On Wed, Jul 4, 2012 at 2:11 PM, Raghavendra 
raghavendra@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


Re: [GENERAL] : Postgresql Error after recovery

2012-07-04 Thread Venkat Balaji
On Wed, Jul 4, 2012 at 2:12 PM, Raghavendra 
raghavendra@enterprisedb.com wrote:

 On Wed, Jul 4, 2012 at 2:11 PM, Raghavendra 
 raghavendra@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*.



Re: [GENERAL] : Postgresql Error after recovery

2012-07-04 Thread Raghavendra

 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/


Re: [GENERAL] : Postgresql Error after recovery

2012-07-04 Thread Venkat Balaji
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@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*.