Restoring a database problem - Mailing list pgsql-general

From Glen Eustace
Subject Restoring a database problem
Date
Msg-id e5b66a06-8b3c-8ff7-7e23-7962026a950c@godzone.net.nz
Whole thread Raw
Responses Re: Restoring a database problem  (Bruce Momjian <bruce@momjian.us>)
List pgsql-general

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.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Glen Eustace,
GodZone Internet Services, a division of AGRE Enterprises Ltd.,
P.O. Box 8020, Palmerston North, New Zealand 4446 Ph +64 6 357 8168, Mob +64 27 542 4015

“Specialising in providing low-cost professional Internet Services since 1997"

pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Database logins taking longer and longer, showing up as "authentication" in ps(1)
Next
From: Bruce Momjian
Date:
Subject: Re: Restoring a database problem