Re: postgres constraint triggers

Поиск
Список
Период
Сортировка
От Ben Chobot
Тема Re: postgres constraint triggers
Дата
Msg-id 3F7F288F-A4DC-4AFD-B538-FD6C9A943C65@silentmedia.com
обсуждение исходный текст
Ответ на postgres constraint triggers  ("Maria L. Wilson" <Maria.L.Wilson-1@nasa.gov>)
Ответы Re: postgres constraint triggers  (Craig Ringer <ringerc@ringerc.id.au>)
Список pgsql-performance
On Sep 26, 2011, at 10:52 AM, Maria L. Wilson wrote:

Our first try to solve this problem has been to convert these triggers into a constraint trigger which allows for DEFERRABLE INITIALLY DEFERRED flags.  This, we are finding, is forcing the trigger function to run after the triggering transaction is completed.  We believe this will fix our locking problem and hopefully speed up our inserts again.

Any comments or past experiences would certainly be helpful!

My memory is fuzzy but as I recall, a possible downside to using deferred constraints was increased memory usage, though I cannot see how at the moment. Regardless, I think the upshot is that they aren't without their cost but as long as you aren't doing massive transactions that cost is probably one that you can afford to pay without much worry. 

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Ineffective autovacuum
Следующее
От: Royce Ausburn
Дата:
Сообщение: Re: Ineffective autovacuum