Re: Restoring a database problem
От | Rob Sargent |
---|---|
Тема | Re: Restoring a database problem |
Дата | |
Msg-id | DCB7F4E2-22CC-4BDD-8B40-D53895F999B0@gmail.com обсуждение исходный текст |
Ответ на | Re: Restoring a database problem (Bruce Momjian <bruce@momjian.us>) |
Список | pgsql-general |
On Sep 30, 2020, at 6:11 PM, Bruce Momjian <bruce@momjian.us> wrote:
https://www.google.com/url?sa=t&source=web&cd=&ved=2ahUKEwiB56D1k5LsAhXBAp0JHQkYA3MQFjAAegQIBxAB&url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F35319597%2Fhow-to-stop-kill-a-query-in-postgresql&usg=AOvVaw0NOCdUxbKHpDTqHulgubqCOn 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 apanic 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 fromconnecting again until the restore has completed.Currently I have been logging into a bunch of servers and stopping variousdaemons, then on the database server killing processes until the database isapparently idle then dropping the database and doing the restore. Thenrestarting the daemons etc. I am sure I am not doing this the right way soadvice gratefully received.
I would modify pg_hba.conf to block access temporarily.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
В списке pgsql-general по дате отправления: