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

From Heikki Linnakangas
Subject Re: Transactions and temp tables
Date
Msg-id 4921C42A.3030600@enterprisedb.com
Whole thread Raw
In response to Re: Transactions and temp tables  (Emmanuel Cecchet <manu@frogthinker.org>)
Responses Re: Transactions and temp tables  (Emmanuel Cecchet <manu@frogthinker.org>)
List pgsql-hackers
Emmanuel Cecchet wrote:
> As I have not found yet an elegant solution to deal with the DROP 
> CASCADE issue, here is a simpler patch that handles temp tables that are 
> dropped at commit time. This is a good first step and we will try to 
> elaborate further to support ON COMMIT DELETE ROWS.

The problem with stopping the postmaster seems to still be there..

All the problems are centered around locking. We need to address that 
and decide what is sane locking behavior wrt. temp tables and 2PC.

First, there's the case where a temp table is created and dropped in the 
same transaction. It seems perfectly sane to me to simply drop all locks 
on the dropped table at PREPARE TRANSACTION. Does anyone see a problem 
with that? If not, we might as well do that for all tables, not just 
temporary ones. It seems just as safe for non-temporary tables.

Secondly, there's the case of accessing a ON COMMIT DELETE ROWS table. 
There too, could we simply drop the locks at PREPARE TRANSACTION? I 
can't immediately see anything wrong with that.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Zdenek Kotala
Date:
Subject: Re: PG_PAGE_LAYOUT_VERSION 5 - time for change
Next
From: "Merlin Moncure"
Date:
Subject: Re: Compiling on HP-UX 10.20 fails