Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7E98E9F9EED for ; Thu, 16 Nov 2006 14:24:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 99631-07 for ; Thu, 16 Nov 2006 14:24:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 4288D9F9998 for ; Thu, 16 Nov 2006 14:24:36 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kAGIOZJl019723; Thu, 16 Nov 2006 13:24:35 -0500 (EST) To: Will Cameron cc: pgsql-admin@postgresql.org Subject: Re: all postgres users do "not exist" In-reply-to: <20061116174050.93090.qmail@web62414.mail.re1.yahoo.com> References: <20061116174050.93090.qmail@web62414.mail.re1.yahoo.com> Comments: In-reply-to Will Cameron message dated "Thu, 16 Nov 2006 09:40:49 -0800" Date: Thu, 16 Nov 2006 13:24:35 -0500 Message-ID: <19722.1163701475@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/165 X-Sequence-Number: 23692 Will Cameron writes: > I'm not sure what exactly you mean by "starting a standalone postgres > session and using it to recreate your SQL users". Do you mean running > initdb on a new data directory and then trying to create new users? No, I mean stopping the postmaster, running a stand-alone backend as documented in http://www.postgresql.org/docs/8.0/static/app-postgres.html and issuing a CREATE USER command for each account you find is missing from pg_shadow. You could probably just recreate the postgres superuser this way, and then go back to normal operating mode for the rest of the recovery. Note you'll want to use the SYSID option of CREATE USER to make sure the users are recreated with the same pg_shadow.usesysid they had before, else their owned objects will not be correctly linked to them. Look into the owner columns of pg_class etc to determine the values you need. regards, tom lane