X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by svr1.postgresql.org (Postfix) with ESMTP id 08E41EFF7F for ; Thu, 5 Jun 2003 14:50:01 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr1.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 91777-05 for ; Thu, 5 Jun 2003 14:49:58 +0000 (GMT) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by svr1.postgresql.org (Postfix) with ESMTP id 8FD15EFF73 for ; Thu, 5 Jun 2003 14:49:57 +0000 (GMT) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 19Nw3x-0004Ft-0U; Thu, 05 Jun 2003 15:49:57 +0100 Received: from localhost ([127.0.0.1] ident=olly) by linda.lfix.co.uk with esmtp (Exim 3.36 #1 (Debian)) id 19Nw3v-0007mv-00; Thu, 05 Jun 2003 15:49:55 +0100 Subject: Re: Urgent: Restoring many schemas in a database From: Oliver Elphick To: stephen@cass-ltd.co.uk Cc: pgsql-admin@postgresql.org In-Reply-To: <200306051149.32063.stephen@cass-ltd.co.uk> References: <200306051149.32063.stephen@cass-ltd.co.uk> Content-Type: text/plain Organization: LFIX Limited Message-Id: <1054824594.12265.14.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 05 Jun 2003 15:49:55 +0100 Content-Transfer-Encoding: 7bit X-Archive-Number: 200306/24 X-Sequence-Number: 9015 On Thu, 2003-06-05 at 11:49, Stephen J. Thompson wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello all, > > I am trying to restore a 7.3 database with many schemas and schema users in > it. The issue I am having is that there are many \connect statements in the > backup file and it keeps asking me for a new password each time. Is there an > easier way than examining the file and carefully following the connect > statement orders and entering the correct password. (btw there are over 100 > connect statements). The simplest and quickest way is to alter pg_hba.conf to allow trust authentication while you are reloading; then it will not ask for any authentication at all. Send the postmaster a SIGHUP to tell it to reread the file. There is a period of vulnerability to unwanted access while you are doing this, so you should take what measures you can to reduce it, such as allowing trust for a local user only and restoring pg_hba.conf as soon as the reload is finished. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight, UK http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C ======================================== "Let your conversation be without covetousness; and be content with such things as ye have. For he hath said, I will never leave thee, nor forsake thee." Hebrews 13:5