From: | Dimitri Fontaine <dimitri(at)citusdata(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Prepare Transaction support for ON COMMIT DROP temporary tables |
Date: | 2018-12-28 11:46:13 |
Message-ID: | m2d0pllvqy.fsf@dimitris-macbook-pro.home |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
oncommitdrop-px.patch | text/x-patch | 9.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Vik Fearing | 2018-12-28 11:57:37 | Re: Prepare Transaction support for ON COMMIT DROP temporary tables |
Previous Message | Peter Eisentraut | 2018-12-28 11:08:43 | Re: could recovery_target_timeline=latest be the default in standby mode? |