Re: Protect a table against concurrent data changes while allowing to vacuum it - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Protect a table against concurrent data changes while allowing to vacuum it
Date
Msg-id A737B7A37273E048B164557ADEF4A58B53863C2E@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Protect a table against concurrent data changes while allowing to vacuum it  (Vlad Arkhipov <arhipov@dc.baikal.ru>)
List pgsql-general
Vlad Arkhipov wrote:
> I have a constraint that requires a table to be locked before checking
> it (i.e. no more than 2 records with the same value in the same column).
> If I lock the table in the SHARE ROW EXCLUSIVE mode, any vacuuming (or
> autovacuuming) process prevents me from checking the constraint. What
> are possible solutions?

Can you describe your check in more detail?
Why don't you use simple unique constraints?

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Sameer Kumar
Date:
Subject: Re: Protect a table against concurrent data changes while allowing to vacuum it
Next
From: Vlad Arkhipov
Date:
Subject: Re: Protect a table against concurrent data changes while allowing to vacuum it