Re: Disconnecting users for backup etc - Mailing list pgsql-general

From Doug McNaught
Subject Re: Disconnecting users for backup etc
Date
Msg-id m3n17t568z.fsf@belphigor.mcnaught.org
Whole thread Raw
In response to Disconnecting users for backup etc  (Stephen Davies <scldad@sdc.com.au>)
List pgsql-general
Stephen Davies <scldad@sdc.com.au> writes:

> Hello.
>
> What is the recommended method of disconnecting all users while a
> database is vacuumed and backed up?

You don't have to do this unless you really want to.

Backups created by pg_dump are internally consistent as of the start
of the dump (they run inside a transaction).

VACUUM runs with users on-line just fine.  It may affect performance
while it's running, since it locks tables, but it won't have any
problems.

> I have tried a stop/start cycle but this doesn't work. The only method
> that I have found so far that does work is to kill -9 every postgresql
> process but this sounds way too heavy handed.

WIth a reasonably modern Postgres, 'pg_ctl stop -m fast' should bring
it down semi-hard.  With older versions you can have the same effect
by sending SIGINT to the postmaster process.

-Doug
--
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time...          --Dylan

pgsql-general by date:

Previous
From: Stephen Davies
Date:
Subject: Disconnecting users for backup etc
Next
From: Philip Hallstrom
Date:
Subject: Re: dumping strategy