Re: Suggestions for blocking user inserts during admin bulk loading. - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Suggestions for blocking user inserts during admin bulk loading.
Date
Msg-id dcc563d10903110710r7cf52a40le4d0b25cb4cde243@mail.gmail.com
Whole thread Raw
In response to Suggestions for blocking user inserts during admin bulk loading.  ("Woody Woodring" <george.woodring@iglass.net>)
List pgsql-general
On Wed, Mar 11, 2009 at 8:01 AM, Woody Woodring
<george.woodring@iglass.net> wrote:
> I have a table that users can update if the data is old.  Once a day I
> update every entry in the table.  However I get primary key violations
> occasionally which it seems a user inserted into the table while the bulk
> insert is going on.

Yeah, you need to first deny access rights to all users that aren't
the one doing the loading, then kick off all the users that are
already connected.  To remove the rights of anyone else to connect,
the easiest way is to edit pg_hba.conf / have a special pg_hba.conf to
copy into place, then reload the db.  After that, from a shell script
or something, you need to kill the backends that are still connected.

pgsql-general by date:

Previous
From: "Woody Woodring"
Date:
Subject: Suggestions for blocking user inserts during admin bulk loading.
Next
From: "Joshua D. Drake"
Date:
Subject: Re: I don't want to back up index files