X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 26706D1C937 for ; Tue, 29 Jul 2003 17:06:49 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 81584-10 for ; Tue, 29 Jul 2003 14:05:49 -0300 (ADT) Received: from cosimo.hosting365.ie (sprocket.hosting365.ie [217.114.166.205]) by svr1.postgresql.org (Postfix) with ESMTP id EBD5DD1C936 for ; Tue, 29 Jul 2003 14:06:46 -0300 (ADT) Received: from cosimo.hosting365.ie (localhost.localdomain [127.0.0.1]) by cosimo.hosting365.ie (8.12.8/8.12.8) with ESMTP id h6TH6jGg008501; Tue, 29 Jul 2003 18:06:45 +0100 Received: (from john@localhost) by cosimo.hosting365.ie (8.12.8/8.12.8/Submit) id h6TH6hkr008497; Tue, 29 Jul 2003 18:06:43 +0100 X-Authentication-Warning: cosimo.hosting365.ie: john set sender to valen@tuatha.org using -f Subject: Re: Postgres db corrupted ? From: "John P. Looney" To: Tom Lane Cc: postgres In-Reply-To: <29907.1059497704@sss.pgh.pa.us> References: <1059470890.5588.41.camel@cosimo.hosting365.ie> <21943.1059489530@sss.pgh.pa.us> <20030729162256.GA5304@magicbluesmoke.net> <29907.1059497704@sss.pgh.pa.us> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-R6Dta4m33NDMERMgZs48" Organization: Message-Id: <1059498403.7984.193.camel@cosimo.hosting365.ie> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 29 Jul 2003 18:06:43 +0100 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/291 X-Sequence-Number: 9631 --=-R6Dta4m33NDMERMgZs48 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 >=20 > UPDATE pg_database SET datdba =3D WHERE datdba IS = NULL; >=20 > 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 --=-R6Dta4m33NDMERMgZs48 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA/JqmjYBVPvqzGrWgRAr9SAJ9se2dpFYJU0ecQueWm4VaDDbPhcwCgpiu/ cJUWdkbNnzSuFsEGZlNG0iE= =S8vK -----END PGP SIGNATURE----- --=-R6Dta4m33NDMERMgZs48--