Re: Prepare Transaction support for ON COMMIT DROP temporary tables - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Prepare Transaction support for ON COMMIT DROP temporary tables
Date
Msg-id CA+TgmoYnrCqfreyOwSzL-ei+qMapTwAMpQNwpmbp+=Wq78kQCQ@mail.gmail.com
Whole thread Raw
In response to Re: Prepare Transaction support for ON COMMIT DROP temporary tables  (Vik Fearing <vik.fearing@2ndquadrant.com>)
Responses Re: Prepare Transaction support for ON COMMIT DROP temporary tables  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Fri, Jan 18, 2019 at 4:50 AM Vik Fearing <vik.fearing@2ndquadrant.com> wrote:
> Isn't that what happens already?  PrepareTransaction() calls
> PreCommit_on_commit_actions() from what I can tell.

Huh.  Well, in that case, I'm not sure I understand we really need to
do beyond removing the error checks for the case where all tables are
on-commit-drop.

It could be useful to do something about the issue with pg_temp
creation that Tom linked to in the other thread.  But even if you
didn't do that, it'd be pretty easy to work around this in application
code -- just issue a dummy CREATE TEMP TABLE .. ON COMMIT DROP
statement the first time you use a connection, so that the temp schema
definitely exists.  So I'm not sure I'd view that as a blocker for
this patch, even though it's kind of a sucky limitation.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Andreas Karlsson
Date:
Subject: Re: Feature: temporary materialized views
Next
From: Tom Lane
Date:
Subject: Re: Tid scan improvements