Re: count(*) performance improvement ideas

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: count(*) performance improvement ideas
Дата
Msg-id 5522.1208391659@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: count(*) performance improvement ideas  ("Stephen Denne" <Stephen.Denne@datamail.co.nz>)
Ответы Re: count(*) performance improvement ideas  ("Stephen Denne" <Stephen.Denne@datamail.co.nz>)
Список pgsql-hackers
"Stephen Denne" <Stephen.Denne@datamail.co.nz> writes:
> Aside: It is currently more cumbersome to get a function to run, if needed, at commit. Ideal solution would be
somethinglike "EXECUTE ON COMMIT my_function()" or maybe "SAVEPOINT my_name ON COMMIT my_function()", but these
suggestionsare made without investigating what provision the SQL standard has made to address this need.
 

There is none, and the reason seems pretty obvious to me.  What if your
"on commit" function fails?  Or if you have two, and the second one
fails?  Or even more to the point, the second one does something that
the first one expected to see the effects of?

Transaction commit is an exceedingly subtle and carefully structured
thing.  Throwing random user-defined code into it ain't gonna happen.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Lessons from commit fest
Следующее
От: PFC
Дата:
Сообщение: Re: count(*) performance improvement ideas