Re: Checkpoint not retrying failed fsync?

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Checkpoint not retrying failed fsync?
Date: 2018-04-08 05:36:00
Message-ID: CAA4eK1KHXazjeb+Tyq+3UDHyNpMU7qL3FzYjLEzN-ZQ678L5pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Apr 6, 2018 at 6:26 AM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> wrote:
> On Fri, Apr 6, 2018 at 11:36 AM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
>> On Fri, Apr 6, 2018 at 11:34 AM, Andrew Gierth
>> <andrew(at)tao11(dot)riddles(dot)org(dot)uk> wrote:
>>> Right.
>>>
>>> But I don't think just copying the value is sufficient; if a new bit was
>>> set while we were processing the old ones, how would we know which to
>>> clear? We couldn't just clear all the bits afterwards because then we
>>> might lose a request.
>>
>> Agreed. The attached draft patch handles that correctly, I think.
>
> After some testing, here is a better one for review. Changes:
>
> 1. The copy wasn't really needed.
> 2. errno needed to be restored (in case bms_union stomped on it),
> thanks to Andrew for an off-list complaint about that.
> 3. Memory context was wrong.
> 4. bms_first_member() eats its input. Need to use bms_next_member() instead.
>

Won't in the success case, you need to delete each member (by
something like bms_del_member) rather than just using bms_free?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Arseny Sher 2018-04-08 05:46:04 Fix slot's xmin advancement and subxact's lost snapshots in decoding.
Previous Message Andrew Gierth 2018-04-08 05:32:29 Re: pgsql: Support partition pruning at execution time