Prepare Transaction support for ON COMMIT DROP temporary tables

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Prepare Transaction support for ON COMMIT DROP temporary tables
Дата
Msg-id m2d0pllvqy.fsf@dimitris-macbook-pro.home
обсуждение исходный текст
Ответы Re: Prepare Transaction support for ON COMMIT DROP temporary tables  (Vik Fearing <vik.fearing@2ndquadrant.com>)
Re: Prepare Transaction support for ON COMMIT DROP temporary tables  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi,

Please find attached a patch to enable support for temporary tables in
prepared transactions when ON COMMIT DROP has been specified.

The comment in the existing code around this idea reads:

     * Don't allow PREPARE TRANSACTION if we've accessed a temporary table in
     * this transaction.
         [ ... ]
     * XXX In principle this could be relaxed to allow some useful special
     * cases, such as a temp table created and dropped all within the
     * transaction.  That seems to require much more bookkeeping though.

In the attached patch I have added this paragraph, and of course the
implementation of it:

     * A special case of this situation is using ON COMMIT DROP, where the
     * call to PreCommit_on_commit_actions() is then responsible for
     * performing the DROP table within the transaction and before we get
     * here.

Regards,
-- 
dim


Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: could recovery_target_timeline=latest be the default in standbymode?
Следующее
От: Vik Fearing
Дата:
Сообщение: Re: Prepare Transaction support for ON COMMIT DROP temporary tables