Re: Postgres db corrupted ?

From: "John P(dot) Looney" <valen(at)tuatha(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: postgres <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Postgres db corrupted ?
Date: 2003-07-29 17:06:43
Message-ID: 1059498403.7984.193.camel@cosimo.hosting365.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Devrim GUNDUZ 2003-07-29 17:23:10 Re: changing ownership of db
Previous Message Benjamin Thelen (CCGIS) 2003-07-29 16:56:01 changing ownership of db