Re: Nested transactions and tuple header info

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Manfred Koizar <mkoi-pg(at)aon(dot)at>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Nested transactions and tuple header info
Date: 2004-06-13 22:02:16
Message-ID: 20040613220215.GA12618@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jun 13, 2004 at 01:22:05PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> > Not sure how to fix this -- I'm not even sure what the exact problem is,
> > because it's trying to insert the oid of a toast table in
> > pg_class_oid_index during the first ALTER TABLE ... CREATE TOAST TABLE.
> > Why would it see an old tuple with the same value, I don't know.
>
> This is probably an UPDATE operation not an INSERT. There are quite a
> few paths through CREATE TABLE that involve repeated updates of the
> new pg_class row.

Huh, right.

> I would think however that these changes would occur as successive
> commands of a single transaction, not as subtransactions, unless you've
> done something odd to CommandCounterIncrement.

Right, but I've taken the XMAX_IS_XMIN bit and replaced it with the
phantom Ids idea. Probably this problem wouldn't have shown up if I
hadn't done that, but we need to cope anyway.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La principal característica humana es la tontería"
(Augusto Monterroso)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-06-13 22:08:45 Re: Can get GiST RECHECK clause to work
Previous Message Tom Lane 2004-06-13 21:58:54 Re: Releasing 7.4.3 ...