Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
Date
Msg-id CAB7nPqRShqy28WGFcOVXauvCfB6ANkzVtK+90NZZLb83uLzqrA@mail.gmail.com
Whole thread Raw
In response to Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Sun, Feb 7, 2016 at 2:49 AM, Andres Freund <andres@anarazel.de> wrote:
> On 2016-02-06 22:03:15 +0900, Michael Paquier wrote:
>> +     /*
>> +      * Update the progress LSN positions. At least one WAL insertion lock
>> +      * is already taken appropriately before doing that, and it is just more
>> +      * simple to do that here where WAL record data and type is at hand.
>> +      * The progress is set at the start position of the record tracked that
>> +      * is being added, making easier checkpoint progress tracking as the
>> +      * control file already saves the start LSN position of the last
>> +      * checkpoint run.
>> +      */
>> +     if (!isStandbySnapshot)
>> +     {
>
> I don't like isStandbySnapshot much, it seems better to do this more
> generally, via a flag passed down by the inserter.

Instead of updating every single call of XLogInsert() in the system,
what do you think about introducing a new routine XLogInsertExtended()
that would have this optional flag? This would wrap the existing
XLogInsert() and pass the flag to XLogInsertRecord().
-- 
Michael



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Recently added typedef "string" is a horrid idea
Next
From: Robert Haas
Date:
Subject: Re: Recently added typedef "string" is a horrid idea