Re: Restoring a database problem - Mailing list pgsql-general

From Ron
Subject Re: Restoring a database problem
Date
Msg-id 82097994-6772-dfd7-84e0-8f150af25e26@gmail.com
Whole thread Raw
In response to Re: Restoring a database problem  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Restoring a database problem  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general
On 9/30/20 7:11 PM, Bruce Momjian wrote:
> On Thu, Oct  1, 2020 at 01:00:21PM +1300, Glen Eustace wrote:
>> I have had to do this so rarely and it has almost always been in a bit of a
>> panic so may well be missing something really obvious.
>>
>> What I want to know is how to quiese a database to that I can restore it.
>>
>> I need to close all existing connections and the prevent people/processes from
>> connecting again until the restore has completed.
>>
>> Currently I have been logging into a bunch of servers and stopping various
>> daemons, then on the database server killing processes until the database is
>> apparently idle then dropping the database and doing the restore. Then
>> restarting the daemons etc. I am sure I am not doing this the right way so
>> advice gratefully received.
> I would modify pg_hba.conf to block access temporarily.

As would I; it's the first thing I thought of...

-- 
Angular momentum makes the world go 'round.



pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Restoring a database problem
Next
From: Matthias Apitz
Date:
Subject: Re: Problem close curser after rollback