Re: assertions and constraint triggers
| От | Peter Eisentraut |
|---|---|
| Тема | Re: assertions and constraint triggers |
| Дата | |
| Msg-id | 1281541664.26522.6.camel@vanquo.pezone.net обсуждение исходный текст |
| Ответ на | Re: assertions and constraint triggers (Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi>) |
| Список | pgsql-hackers |
On ons, 2010-08-11 at 13:23 +0300, Marko Tiikkaja wrote: > But you'd have to somehow make the constraints to be checked > with true serializability, and that part of the original suggestion > seemed to be completely missing. Not sure how hard that would be > though. I don't think somehow running the constraint checks at a different transaction isolation level than the rest of the transaction is sensible. I imagine the solution would look similar to how foreign keys do it: take a lock on the rows that are required for constraint satisfaction. For general assertions, this would require predicate locking. But also notice that for the (SELECT count(*) FROM tbl) = N case, this is the same as a table lock. I don't think there is any magic around it.
В списке pgsql-hackers по дате отправления: