Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
Date: 2016-02-07 00:19:08
Message-ID: CAB7nPqRShqy28WGFcOVXauvCfB6ANkzVtK+90NZZLb83uLzqrA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Sun, Feb 7, 2016 at 2:49 AM, Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Burkhardt.Renz 2016-02-07 11:14:37 BUG #13932: German ß not a valid character in psql
Previous Message Tom Lane 2016-02-06 23:37:58 Re: Re[2]: [BUGS] Segfault in MemoryContextAlloc

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-02-07 01:54:45 Re: Recently added typedef "string" is a horrid idea
Previous Message Tom Lane 2016-02-06 22:11:07 Recently added typedef "string" is a horrid idea