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

From Vlad Arkhipov
Subject Protect a table against concurrent data changes while allowing to vacuum it
Date
Msg-id 576A55EC.3060403@dc.baikal.ru
Whole thread Raw
Responses Re: Protect a table against concurrent data changes while allowing to vacuum it  (Sameer Kumar <sameer.kumar@ashnik.com>)
Re: Protect a table against concurrent data changes while allowing to vacuum it  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general
Hello,

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?


pgsql-general by date:

Previous
From: Erik Gustafson
Date:
Subject: Re: optimizing a query
Next
From: Sameer Kumar
Date:
Subject: Re: Protect a table against concurrent data changes while allowing to vacuum it