pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Emmanuel Cecchet <manu@frogthinker.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Transactions and temp tables
Date: Mon, 17 Nov 2008 21:21:14 +0200
Message-ID: <4921C42A.3030600@enterprisedb.com> (raw )
In-Reply-To: <4914CD14.2060608@frogthinker.org >
References: <48EA7B12.6050906@frogthinker.org >
<48EB0551.50205@enterprisedb.com >
<48EB95B7.10604@frogthinker.org >
<48EC7EB5.5020001@enterprisedb.com >
<48ECAA8F.3070306@frogthinker.org >
<28137.1223472191@sss.pgh.pa.us >
<48ECBBC2.6060003@frogthinker.org >
<29132.1223475486@sss.pgh.pa.us >
<48EFA13C.2060407@frogthinker.org >
<490F804A.60108@enterprisedb.com >
<490FB4B3.908@frogthinker.org >
<49106B10.2090407@enterprisedb.com >
<4910DFC0.3080301@frogthinker.org >
<4914CD14.2060608@frogthinker.org >
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
view thread (36+ messages) latest in thread
Message-ID: <4921C42A.3030600@enterprisedb.com>
Permalink: ../4921C42A.3030600@enterprisedb.com/
Also on: postgresql.org/message-id/4921C42A.3030600@enterprisedb.com
copy link · copy postgr.es
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: pgsql-hackers@postgresql.org
Cc: heikki.linnakangas@enterprisedb.com, manu@frogthinker.org, tgl@sss.pgh.pa.us
Subject: Re: Transactions and temp tables
In-Reply-To: <4921C42A.3030600@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox