Re: Transactions and temp tables - Mailing list pgsql-hackers

From Emmanuel Cecchet
Subject Re: Transactions and temp tables
Date
Msg-id 48ECBBC2.6060003@frogthinker.org
Whole thread Raw
In response to Re: Transactions and temp tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Transactions and temp tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Emmanuel Cecchet <manu@frogthinker.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


pgsql-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Building Postgres in Eclipse
Next
From: Chris Mayfield
Date:
Subject: Re: Building Postgres in Eclipse