Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updatedtuple
От | Wong, Yi Wen |
---|---|
Тема | Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updatedtuple |
Дата | |
Msg-id | 1507088579842.74063@amazon.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple (Peter Geoghegan <pg@bowt.ie>) |
Ответы |
Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updatedtuple
Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple |
Список | pgsql-hackers |
My interpretation of README.HOT is the check is just to ensure the chain is continuous; in which case the condition shouldbe: > if (TransactionIdIsValid(priorXmax) && > !TransactionIdEquals(priorXmax, HeapTupleHeaderGetRawXmin(htup))) > break; So the difference is GetRawXmin vs GetXmin, because otherwise we get the FreezeId instead of the Xmin when the transactionhappened The interesting consequence of changing that is the prune seems to get the entire chain altogether with Dan's repro... I'verun it a couple of times and have consistently gotten the following page lp | t_ctid | lp_off | lp_flags | t_infomask | t_infomask2 ----+--------+--------+----------+------------+------------- 1 | (0,1) | 8152 | 1 | 2818 | 3 2| | 7 | 2 | | 3 | | 0 | 0 | | 4 | | 0 | 0 | | 5 | | 0 | 0 | | 6 | | 0 | 0 | | 7 | (0,7) | 8112 | 1 | 11010 | 32771 (7 rows) I've made this change to conditions in both heap_prune_chain and heap_get_root_tuples and this seems to cause things to passmy smoke tests. I'll look into this deeper tomorrow. Yi Wen ________________________________________ From: Peter Geoghegan <pg@bowt.ie> Sent: Tuesday, October 3, 2017 6:19 PM To: Wood, Dan Cc: Michael Paquier; Alvaro Herrera; PostgreSQL Hackers; Wong, Yi Wen Subject: Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple On Tue, Oct 3, 2017 at 6:09 PM, Wood, Dan <hexpert@amazon.com> wrote: > I’ve just started looking at this again after a few weeks break. > if (TransactionIdIsValid(priorXmax) && > !TransactionIdEquals(priorXmax, HeapTupleHeaderGetXmin(htup))) > break; > We need to understand why these TXID equal checks exist. Can we differentiate the cases they are protecting against withthe two exceptions I’ve found? I haven't read your remarks here in full, since I'm about to stop working for the day, but I will point out that src/backend/access/heap/README.HOT says a fair amount about this, under "Abort Cases". -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
В списке pgsql-hackers по дате отправления: