Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changing WAL Header to reduce contention during ReserveXLogInsertLocation()
Date: 2018-03-28 03:43:19
Message-ID: CAA8=A781Zrwgddhf5i3OP-5FXijY4Uc9w3NoYHpVSaQk-Zj4HA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 28, 2018 at 12:57 PM, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Tue, Mar 27, 2018 at 10:09:59PM -0400, Robert Haas wrote:
>>> I have to agree with Tom here. If you force pg_rewind to replay more
>>> WAL records from a checkpoint older than the checkpoint prior to where
>>> WAL has forked at promotion then you have a risk of losing data.
>>
>> Oh! I see now. Good point.
>
> Something that would address the issue would be to enforce a segment
> switch after each checkpoint, but that's a high price to pay on mostly
> idle systems with large WAL segments, which is not appealing either, and
> this even if the checkpoint skip logic has been fixed in v10 with the
> concept of "important" WAL records.

If the system is mostly idle would it really matter that much?

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-03-28 03:53:08 Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
Previous Message Tom Lane 2018-03-28 03:28:19 Re: Parallel Aggregates for string_agg and array_agg