From: | Alvaro Herrera <alvherre(at)surnet(dot)cl> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: A 2 phase commit weirdness |
Date: | 2005-05-31 12:44:48 |
Message-ID: | 20050531124448.GA5451@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, May 31, 2005 at 02:09:56AM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)surnet(dot)cl> writes:
> > But at awakening, the user will get this:
> > ERROR: relation 66002 deleted while still in use
> > This is ugly -- I don't think there is a way to get out of it.
>
> There had better be a way, since (I suppose) the ERROR is preventing the
> commit from succeeding ...
No, the ERROR is in a completely unrelated transaction. The scenario
again is this:
CREATE TABLE foo ();
BEGIN;
DROP TABLE foo;
PREPARE TRANSACTION 'foo';
SELECT * FROM foo;
-- hangs
COMMIT TRANSACTION 'foo';
ERROR, relation deleted while still in
use
So it's a rather contorted situation to begin with.
> > Unrelated question: is it intended that the prepared transactions are
> > visible cross-database through pg_prepared_xacts?
>
> That is a good question. Can a backend running in a different database
> execute the COMMIT (or ROLLBACK)? Offhand I'd bet that will not work,
> which suggests we'd better make the view per-database. [ thinks a bit
> more... ] We might be able to make it work, but there seems like a lot
> of potential for bugs/fragility there. Might be best to take the narrow
> definition to start with.
Ok.
--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"El sentido de las cosas no viene de las cosas, sino de
las inteligencias que las aplican a sus problemas diarios
en busca del progreso." (Ernesto Hernández-Novich)
From | Date | Subject | |
---|---|---|---|
Next Message | Jonah H. Harris | 2005-05-31 13:12:26 | Re: Oracle Style packages on postgres |
Previous Message | Barnali | 2005-05-31 11:21:34 | ddl triggers |