Thread: Can't open Postgres at all!!!

Can't open Postgres at all!!!

From
"Silvela, Jaime \(Exchange\)"
Date:
I just came back this morning after doing a  REINDEX of pg_class
Nothing is working. I try to REINDEX pg_class and it complains
ERROR:  could not open relation 1663/16390/2662: No such file or
directory

I try to REINDEX DATABASE and same thing. I can't open any tables.

Any ideas?

And yes Tom, lately I have seen a couple of small issues that may
indicate
hardware flakiness. Postgres version is 8.1.2 on linux.


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Wednesday, August 23, 2006 7:43 PM
To: Silvela, Jaime (Exchange)
Cc: pgsql-general
Subject: Re: [GENERAL] CASCADING could not open relation with OID

"Silvela, Jaime \(Exchange\)" <JSilvela@bear.com> writes:
> What could be the possible cause for this?

Hard to say ... have you had any hardware flakiness lately?  Are you
running an up-to-date PG release?

            regards, tom lane




***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.

Bear Stearns does not provide tax, legal or accounting advice.  You
should consult your own tax, legal and accounting advisors before
engaging in any transaction. In order for Bear Stearns to comply with
Internal Revenue Service Circular 230 (if applicable), you are notified
that any discussion of U.S. federal tax issues contained or referred to
herein is not intended or written to be used, and cannot be used, for
the purpose of:  (A) avoiding penalties that may be imposed under the
Internal Revenue Code; nor (B) promoting, marketing or recommending to
another party any transaction or matter addressed herein.
***********************************************************************

Re: Can't open Postgres at all!!!

From
Tom Lane
Date:
"Silvela, Jaime \(Exchange\)" <JSilvela@Bear.com> writes:
> I just came back this morning after doing a  REINDEX of pg_class
> Nothing is working. I try to REINDEX pg_class and it complains
> ERROR:  could not open relation 1663/16390/2662: No such file or
> directory

If the index entries for the system catalogs themselves are hosed,
you may have to start the session with PGOPTIONS="-P" (to disable
trusting system indexes) in order to do REINDEX successfully.

However, there is zero point in doing any repair work until you have a
stable hardware platform to do it on, so I'd get after the hardware
problem first.  The longer you run the database with the current
degree of instability, the more likely you are to have some corruption
in table pages rather than index pages ... and a simple REINDEX won't
get you out of that.

            regards, tom lane

Re: Can't open Postgres at all!!!

From
"Silvela, Jaime \(Exchange\)"
Date:
Excuse my ignorance, how do I do that. Linux env setting? Is it a
command line option for Postmaster?

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, August 24, 2006 9:06 AM
To: Silvela, Jaime (Exchange)
Cc: pgsql-general
Subject: Re: [GENERAL] Can't open Postgres at all!!!

"Silvela, Jaime \(Exchange\)" <JSilvela@Bear.com> writes:
> I just came back this morning after doing a  REINDEX of pg_class
> Nothing is working. I try to REINDEX pg_class and it complains
> ERROR:  could not open relation 1663/16390/2662: No such file or
> directory

If the index entries for the system catalogs themselves are hosed,
you may have to start the session with PGOPTIONS="-P" (to disable
trusting system indexes) in order to do REINDEX successfully.

However, there is zero point in doing any repair work until you have a
stable hardware platform to do it on, so I'd get after the hardware
problem first.  The longer you run the database with the current
degree of instability, the more likely you are to have some corruption
in table pages rather than index pages ... and a simple REINDEX won't
get you out of that.

            regards, tom lane



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.

Bear Stearns does not provide tax, legal or accounting advice.  You
should consult your own tax, legal and accounting advisors before
engaging in any transaction. In order for Bear Stearns to comply with
Internal Revenue Service Circular 230 (if applicable), you are notified
that any discussion of U.S. federal tax issues contained or referred to
herein is not intended or written to be used, and cannot be used, for
the purpose of:  (A) avoiding penalties that may be imposed under the
Internal Revenue Code; nor (B) promoting, marketing or recommending to
another party any transaction or matter addressed herein.
***********************************************************************

Re: Can't open Postgres at all!!!

From
"Silvela, Jaime \(Exchange\)"
Date:
I did setenv PGOPTIONS "-P" and restarted the database, and still get
ERROR:  could not open relation 1663/16390/2662

I'm going to try to restore from a previous copy. Any other ideas?

Thanks
Jaime


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, August 24, 2006 9:06 AM
To: Silvela, Jaime (Exchange)
Cc: pgsql-general
Subject: Re: [GENERAL] Can't open Postgres at all!!!

"Silvela, Jaime \(Exchange\)" <JSilvela@Bear.com> writes:
> I just came back this morning after doing a  REINDEX of pg_class
> Nothing is working. I try to REINDEX pg_class and it complains
> ERROR:  could not open relation 1663/16390/2662: No such file or
> directory

If the index entries for the system catalogs themselves are hosed,
you may have to start the session with PGOPTIONS="-P" (to disable
trusting system indexes) in order to do REINDEX successfully.

However, there is zero point in doing any repair work until you have a
stable hardware platform to do it on, so I'd get after the hardware
problem first.  The longer you run the database with the current
degree of instability, the more likely you are to have some corruption
in table pages rather than index pages ... and a simple REINDEX won't
get you out of that.

            regards, tom lane



***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.

Bear Stearns does not provide tax, legal or accounting advice.  You
should consult your own tax, legal and accounting advisors before
engaging in any transaction. In order for Bear Stearns to comply with
Internal Revenue Service Circular 230 (if applicable), you are notified
that any discussion of U.S. federal tax issues contained or referred to
herein is not intended or written to be used, and cannot be used, for
the purpose of:  (A) avoiding penalties that may be imposed under the
Internal Revenue Code; nor (B) promoting, marketing or recommending to
another party any transaction or matter addressed herein.
***********************************************************************

Re: Can't open Postgres at all!!!

From
Tom Lane
Date:
"Silvela, Jaime \(Exchange\)" <JSilvela@Bear.com> writes:
>> If the index entries for the system catalogs themselves are hosed,
>> you may have to start the session with PGOPTIONS="-P" (to disable
>> trusting system indexes) in order to do REINDEX successfully.

> Excuse my ignorance, how do I do that. Linux env setting? Is it a
> command line option for Postmaster?

Originally it was only a postmaster command line option, but since about
7.4 you can set it in psql's environment, and that's what I'd recommend
for a one-shot repair effort.

            regards, tom lane

Re: Can't open Postgres at all!!!

From
"Joshua D. Drake"
Date:
Silvela, Jaime (Exchange) wrote:
> I did setenv PGOPTIONS "-P" and restarted the database, and still get
> ERROR:  could not open relation 1663/16390/2662
>
> I'm going to try to restore from a previous copy. Any other ideas?

If you have a previous copy, do not restore. Fix your hardware.

My strong suggestion to you is to take a filesystem backup of that
database. Get it off that machine and start running some integrity tests
on the hardware.

Joshua D. Drake


>
> Thanks
> Jaime
>
>
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Thursday, August 24, 2006 9:06 AM
> To: Silvela, Jaime (Exchange)
> Cc: pgsql-general
> Subject: Re: [GENERAL] Can't open Postgres at all!!!
>
> "Silvela, Jaime \(Exchange\)" <JSilvela@Bear.com> writes:
>> I just came back this morning after doing a  REINDEX of pg_class
>> Nothing is working. I try to REINDEX pg_class and it complains
>> ERROR:  could not open relation 1663/16390/2662: No such file or
>> directory
>
> If the index entries for the system catalogs themselves are hosed,
> you may have to start the session with PGOPTIONS="-P" (to disable
> trusting system indexes) in order to do REINDEX successfully.
>
> However, there is zero point in doing any repair work until you have a
> stable hardware platform to do it on, so I'd get after the hardware
> problem first.  The longer you run the database with the current
> degree of instability, the more likely you are to have some corruption
> in table pages rather than index pages ... and a simple REINDEX won't
> get you out of that.
>
>             regards, tom lane
>
>
>
> ***********************************************************************
> Bear Stearns is not responsible for any recommendation, solicitation,
> offer or agreement or any information about any transaction, customer
> account or account activity contained in this communication.
>
> Bear Stearns does not provide tax, legal or accounting advice.  You
> should consult your own tax, legal and accounting advisors before
> engaging in any transaction. In order for Bear Stearns to comply with
> Internal Revenue Service Circular 230 (if applicable), you are notified
> that any discussion of U.S. federal tax issues contained or referred to
> herein is not intended or written to be used, and cannot be used, for
> the purpose of:  (A) avoiding penalties that may be imposed under the
> Internal Revenue Code; nor (B) promoting, marketing or recommending to
> another party any transaction or matter addressed herein.
> ***********************************************************************
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>


--

    === The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
    Providing the most comprehensive  PostgreSQL solutions since 1997
              http://www.commandprompt.com/