Re: [HACKERS] Failed recovery with new faster 2PC code - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: [HACKERS] Failed recovery with new faster 2PC code
Date
Msg-id CANP8+jK_PF6O3CGkomUbk_hj6-P-GHbphL_wtnCXtVv8y1w7TA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Failed recovery with new faster 2PC code  (Nikhil Sontakke <nikhils@2ndquadrant.com>)
Responses Re: [HACKERS] Failed recovery with new faster 2PC code  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On 18 April 2017 at 09:57, Nikhil Sontakke <nikhils@2ndquadrant.com> wrote:

> Please find attached a second version of my bug fix which is stylistically
> better and clearer than the first one.

Yeh, this is better. Pushed.


The bug was that the loop set gxact to be the last entry in the array,
causing the exit condition to fail and us then to remove the last
gxact from memory even when it didn't match the xid, removing a valid
entry too early. That then allowed xmin to move forwards, which causes
autovac to remove pg_xact entries earlier than needed.

Well done for finding that one, thanks for the patch.

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] PANIC in pg_commit_ts slru after crashes
Next
From: Masahiko Sawada
Date:
Subject: [HACKERS] Logical replication and synchronous replication