Re: Urgent: Restoring many schemas in a database

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: stephen(at)cass-ltd(dot)co(dot)uk
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Urgent: Restoring many schemas in a database
Date: 2003-06-05 14:49:55
Message-ID: 1054824594.12265.14.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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(dot)Elphick(at)lfix(dot)co(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message mallah 2003-06-05 14:50:22 Re: Urgent: Restoring many schemas in a database
Previous Message Tom Lane 2003-06-05 14:45:08 Re: Urgent: Restoring many schemas in a database