Bruce Momjian <pgman@candle.pha.pa.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