Re: Nested transactions and tuple header info
От | Tom Lane |
---|---|
Тема | Re: Nested transactions and tuple header info |
Дата | |
Msg-id | 17693.1086132539@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Nested transactions and tuple header info (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Nested transactions and tuple header info
|
Список | pgsql-hackers |
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
В списке pgsql-hackers по дате отправления: