Re: Prepare Transaction support for ON COMMIT DROP temporary tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Dimitri Fontaine <dimitri(at)citusdata(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Prepare Transaction support for ON COMMIT DROP temporary tables
Date: 2019-01-13 20:34:08
Message-ID: 13045.1547411648@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-01-13 21:57:48 Re: [PATCH] Allow anonymous rowtypes in function return column definition
Previous Message Tom Lane 2019-01-13 20:06:00 Re: Proving IS NOT NULL inference for ScalarArrayOpExpr's