Re: Manage PostgreSQL Connections

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: Nagy Karoly <nagykaroly(at)expert-software(dot)ro>, pgsql-general(at)postgresql(dot)org
Subject: Re: Manage PostgreSQL Connections
Date: 2003-08-18 20:59:04
Message-ID: 3F413E18.4070809@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The only thing you want to be aware of is autovacuuming or vacuuming off of a chron script in the middle of dumping.

scott.marlowe wrote:

> On Thu, 14 Aug 2003, Nagy Karoly wrote:
>
>
>>Is there any way to close the connections of other users in PostgreSQL.
>>I wish to run an automatic pg_dump and pg_restore and I guess users must be disconnected first.
>>Is that right?
>
>
> Actually, for a pg_dump, no, you don't need to disconnect people. pg_dump
> creates a single snapshot backup that is consistent across the database
> you are backing up (not the whole cluster of databases, just the one
> you're pointing pg_dump at at the moment.)
>
> It really depends on what you are doing. If you're gonna pg_dump / drop
> database / create database pg_restore it might be a good idea to
> disconnect people so they don't lost data between the dump and restore.
>
> the easy way to do that is to create an alternate pg_hba.conf in the
> $PGDATA directory that only allows the postgresql superuser to attach and
> then restart postgresql with that pg_hba.conf in place.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew L. Gould 2003-08-18 21:07:16 Re: newbie and no idea
Previous Message Vilson farias 2003-08-18 20:44:22 7.3.4 RPM