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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(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 02:27:43
Message-ID: 20180328022743.GH1105@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-03-28 02:33:49 Re: Cast jsonb to numeric, int, float, bool
Previous Message Michael Paquier 2018-03-28 02:24:06 Re: [bug fix] pg_rewind creates corrupt WAL files, and the standby cannot catch up the primary