Re: Postgres db corrupted ? - Mailing list pgsql-admin

From John P. Looney
Subject Re: Postgres db corrupted ?
Date
Msg-id 1059498403.7984.193.camel@cosimo.hosting365.ie
Whole thread Raw
In response to Re: Postgres db corrupted ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Postgres db corrupted ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Tue, 2003-07-29 at 17:55, Tom Lane wrote:
> Hm, that datdba field actually is NULL, isn't it?  That's what you need
> to fix.  The low-level code isn't expecting it to be NULL, and falls
> over in surprising ways.  (Recent releases try to enforce NOT NULL on
> system catalog columns that mustn't be NULL, but I'm not sure how
> bulletproof that really is.)

 Ah, OK. That makes sense.

> I'd try
>
> UPDATE pg_database SET datdba = <something reasonable> WHERE datdba IS NULL;
>
> You could just set them all to 1 (the postgres userid); if you want
> these databases owned by specific users then see pg_shadow.usesysid for
> the numbers to insert.

 OK; is there an already existing table that should have those entries
in it ? As a postgres novice, does that mean that these broken tables
aren't accessible ?

John

Attachment

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgres db corrupted ?
Next
From: Devrim GUNDUZ
Date:
Subject: Re: changing ownership of db