| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Glen Eustace <geustace(at)godzone(dot)net(dot)nz> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Restoring a database problem |
| Date: | 2020-10-01 00:11:00 |
| Message-ID: | 20201001001100.GC26860@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rob Sargent | 2020-10-01 00:41:13 | Re: Restoring a database problem |
| Previous Message | Glen Eustace | 2020-10-01 00:00:21 | Restoring a database problem |