HINT: Please REINDEX it.

Started by nabakumar salamover 18 years ago2 messagesgeneral
Jump to latest
#1nabakumar salam
salamnabakumar@gmail.com

Hi,
When i start the postgres DB , it starts properly. but when i am
trying to connect to it . it shows a pop up with the error message
"Error connecting to the server: FATAL: index "pg_class_oid_index"
contains unexpected zero page at block 0
HINT: Please REINDEX it."
i tried starting the database using --single --P option , but says it
cannot be started with user as admin.

Any pointers on how to solve this problem?

Thanks in advance,
nsalam

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: nabakumar salam (#1)
Re: HINT: Please REINDEX it.

"nabakumar salam" <salamnabakumar@gmail.com> writes:

"Error connecting to the server: FATAL: index "pg_class_oid_index"
contains unexpected zero page at block 0
HINT: Please REINDEX it."
i tried starting the database using --single --P option , but says it
cannot be started with user as admin.

Any pointers on how to solve this problem?

Don't bother with single-user mode. There's an example on the REINDEX
reference page:

$ export PGOPTIONS="-P"
$ psql broken_db
...
broken_db=> REINDEX DATABASE broken_db;
broken_db=> \q

(Not sure how to translate this to Windows, which reading between the
lines I suspect you're using. But Windows does have environment
variables so I suppose there's a way.)

regards, tom lane