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

From Tom Lane
Subject Re: Prepare Transaction support for ON COMMIT DROP temporary tables
Date
Msg-id 13045.1547411648@sss.pgh.pa.us
Whole thread Raw
In response to Re: Prepare Transaction support for ON COMMIT DROP temporary tables  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Prepare Transaction support for ON COMMIT DROP temporary tables  (Dimitri Fontaine <dimitri@citusdata.com>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> Being able to relax a bit the case is better than nothing, so that's
> nice to see incremental improvements.  Thanks Dimitri.

I'm afraid that this patch is likely to be, if not completely broken,
at least very much less useful than one could wish by the time we get
done closing the holes discussed in this other thread:

https://www.postgresql.org/message-id/flat/5d910e2e-0db8-ec06-dd5f-baec420513c3%40imap.cc

For instance, if we're going to have to reject the case where the
session's temporary schema was created during the current transaction,
then that puts a very weird constraint on whether this case works.

Also, even without worrying about new problems that that discussion
may lead to, I don't think that the patch works as-is.  The function
every_on_commit_is_on_commit_drop() does what it says, but that is
NOT sufficient to conclude that every temp table the transaction has
touched is on-commit-drop.  This logic will successfully reject cases
with on-commit-delete-rows temp tables, but not cases where the temp
table(s) lack any ON COMMIT spec at all.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proving IS NOT NULL inference for ScalarArrayOpExpr's
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Allow anonymous rowtypes in function return column definition