Re: Further open item (Was: Status of 7.2)
Bruce Momjian <pgman@candle.pha.pa.us>
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Hannu Krosing <hannu@tm.ee>
Cc: "Tille, Andreas" <TilleA@rki.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2001-11-21T20:59:33Z
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@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026