From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Manfred Koizar <mkoi-pg(at)aon(dot)at>, David Blasby <dblasby(at)refractions(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Nested transactions and tuple header info |
Date: | 2004-06-01 23:28:59 |
Message-ID: | 17693.1086132539@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> BEGIN; xid=1
> INSERT a;
> BEGIN; xid=2
> INSERT b;
> DELETE a; xid=3
> COMMIT;
> COMMIT;
> When "DELETE a" happens, we remove the xmin=1 from the tuple header and
> replace it with xmin=3.
You can't change xmin --- this would break visibility tests. Consider
a cursor opened in the outer transaction after the INSERT a. It should
be able to see the "a" row (note that this depends on recognizing xid
equality and then comparing cid's within the outer transaction). If the
subtransaction mangles xmin then it is no longer possible to make this
test correctly.
This is exactly the same argument as not being able to overwrite cmin.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2004-06-01 23:49:54 | Re: Converting postgresql.conf parameters to kilobytes |
Previous Message | Alvaro Herrera | 2004-06-01 22:55:39 | Re: Nested transactions and tuple header info |