Re: Transactions and temp tables

From: Emmanuel Cecchet <manu(at)frogthinker(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Transactions and temp tables
Date: 2008-10-08 13:55:14
Message-ID: 48ECBBC2.6060003@frogthinker.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Emmanuel Cecchet <manu(at)frogthinker(dot)org> writes:
>
>> Thanks for the example, I get it now. Does it make sense to allow any
>> request execution between PREPARE TRANSACTION and the subsequent COMMIT
>> or ROLLBACK?
>>
>
> Yes. Don't even think of trying to disallow that. The COMMIT doesn't
> even have to happen in the same session, anyway.
>
Ok, so actually I don't see any different behavior between a temp table
or a regular table. The locking happens the same way and as long as the
commit prepared happens (potentially in another session), the lock is
released at commit time which seems to make sense.
The issue that Heikki was mentioning about the server not shutting down
seems to happen as soon as you have a single transaction that has
prepared commit but not commit/rollback yet. This seems also independent
of whether you are using a temp table or not.
It seems that the patch did not alter the behavior of PG in that regard.

What do you think?
Emmanuel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-10-08 14:18:06 Re: Transactions and temp tables
Previous Message Dave Page 2008-10-08 13:52:02 Re: Building Postgres in Eclipse