From: Oliver Elphick <olly@lfix.co.uk>
To: stephen@cass-ltd.co.uk
Cc: pgsql-admin@postgresql.org
Subject: Re: Urgent: Restoring many schemas in a database
Date: 05 Jun 2003 15:49:55 +0100
Message-ID: <1054824594.12265.14.camel@linda.lfix.co.uk> (raw)
In-Reply-To: <200306051149.32063.stephen@cass-ltd.co.uk>
References: <200306051149.32063.stephen@cass-ltd.co.uk>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: olly@lfix.co.uk, stephen@cass-ltd.co.uk
Subject: Re: Urgent: Restoring many schemas in a database
In-Reply-To: <1054824594.12265.14.camel@linda.lfix.co.uk>
References: <200306051149.32063.stephen@cass-ltd.co.uk> <1054824594.12265.14.camel@linda.lfix.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox