agora inbox for [email protected]
help / color / mirror / Atom feedFrom: Emmanuel Cecchet <[email protected]>
To: Heikki Linnakangas <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Transactions and temp tables
Date: Wed, 19 Nov 2008 10:40:38 -0500
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]>
Hi Heikki,
I will try to make more tests.
I still quite did not get what the big deal was if an ON COMMIT DELETE
ROWS temp table was created inside a transaction.
Why the new checks you are doing in lock.c would not work with dropped
temp tables? Could it be possible to drop the lock as soon as the temp
table is dropped inside a transaction?
I will try to find more time to review the patch tonight.
Best,
Emmanuel
> Heikki Linnakangas wrote:
>> Somehow this feels pretty baroque, though. Perhaps a better approach
>> would be to add a new AtPrepare_OnCommitActions function to
>> tablecmds.c, that gets called before AtPrepare_Locks. It would scan
>> through the on_commits list, and release all locks for the
>> "PREPARE-safe" temp tables, and throw the error if necessary. I'll
>> try that next.
>
> Here's what I ended up with. I morphed the on commit action
> registration into tracking of all temporary relations.
>
> This only allows access to ON COMMIT DELETE ROWS temp tables.
> Accessing other temporary tables, and creating or dropping tables in
> the transaction is still forbidden.
>
> It took me a couple of iterations to handle toast tables and indexes
> correctly. More testing would be appreciated with more complex cases
> like VACUUM FULL, subtransactions etc.
>
--
Emmanuel Cecchet
FTO @ Frog Thinker
Open Source Development & Consulting
--
Web: http://www.frogthinker.org
email: [email protected]
Skype: emmanuel_cecchet
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