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 00:14:16 |
Message-ID: | 20050531001416.GA3210@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, May 27, 2005 at 11:12:06AM -0400, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> > Looking at the sequence, at least the relcache init file stuff looks if
> > not broken at least a bit heavy-handed...
>
> I was planning to change that ;-) ... using separate 2PC action records
> for the relcache init file actions would make it much better.
Hum, do you mean separate for 2PC only, or make'em completely separate
invalidation messages?
I fixed the problem I had -- it was very easy to make the messages get
processed locally. However strangeness can still happen. Consider:
create table foo ();
begin;
drop table foo;
prepare transaction 'foo';
Now any backend that tries to access table foo will block, because the
'foo' prepared transaction has acquired a lock on it. However the table
is still visible in the catalogs, as it should be. It can easily be
awakened by other backend doing
commit transaction 'foo';
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.
Unrelated question: is it intended that the prepared transactions are
visible cross-database through pg_prepared_xacts?
--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"No single strategy is always right (Unless the boss says so)"
(Larry Wall)
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2005-05-31 01:07:15 | Re: [HACKERS] pg_buffercache causes assertion failure |
Previous Message | Tom Lane | 2005-05-31 00:08:59 | Re: [HACKERS] pg_buffercache causes assertion failure |