Re: Further open item (Was: Status of 7.2)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: "Tille, Andreas" <TilleA(at)rki(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Further open item (Was: Status of 7.2)
Date: 2001-11-21 20:59:33
Message-ID: 200111212059.fALKxXw07831@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Huh, a non-zero XMAX is fine. You mark the XMAX when you _think_ you
are updating it. It is only expired when the XMAX on the tuple is
committed.

> Or perhaps MAINTAINED INDEX, meaning that it has always both tmin and tmax
> up-to-date.
> Btw 7.2 still has broken behaviour of xmax which by definition should
> not have a
> non-0 value for live tuples
>
> pg72b2=# create table parent(pid int primary key);
> NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index
> 'parent_pkey' for table 'parent'
> CREATE
> pg72b2=# create table child(cid int, pid int references parent);
> NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY
> check(s)
> CREATE
> pg72b2=# insert into parent values(1);
> INSERT 16809 1
> pg72b2=# insert into child values(1,1);
> INSERT 16810 1
> pg72b2=# update child set pid=2;
> ERROR: <unnamed> referential integrity violation - key referenced from
> child not found in parent
> pg72b2=# select xmin,xmax,* from child;
> xmin | xmax | cid | pid
> ------+------+-----+-----
> 171 | 172 | 1 | 1
> (1 row)

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2001-11-21 21:14:01 Re: beta3
Previous Message Stephan Szabo 2001-11-21 20:58:03 Re: Implicit coercions need to be reined in