agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: Emmanuel Cecchet <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Transactions and temp tables
Date: Wed, 03 Dec 2008 11:01:47 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Emmanuel Cecchet wrote:
> There is a problem with temp tables with on delete rows that are created
> inside a transaction.
> Take the 2pc_on_delete_rows_transaction.sql test case and change the
> creation statement, instead of
> create temp table foo(x int) on commit delete rows;
> try
> create temp table foo(x serial primary key) on commit delete rows;
>
> The test will fail. It looks like the onCommit field is not properly
> updated when serial or primary key is used in that context. I did not
> figure out why.
A serial column uses a sequence behind the scenes.
Hmm. Seems like we would need to treat sequences and indexes the same as
tables with ON COMMIT DELETE ROWS, i.e release the locks early and don't
error out.
All in all, this is getting pretty messy. My patch felt a bit hackish to
begin with, and having to add special cases for sequences and indexes
would make it even more so. And what about temporary views? I'm starting
to feel that instead of special-casing temp relations, we need to move
into the opposite direction and make temp relations more like regular
relations. Unfortunately, that's not going to happen in the 8.4
timeframe :-(. Let's try the other approach in 8.5.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
view thread (37+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Transactions and temp tables
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox