Re: Fix checkpoint skip logic on idle systems by tracking LSN progress

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Fix checkpoint skip logic on idle systems by tracking LSN progress
Дата
Msg-id CAA4eK1JfYOPEKqfYwzKBgTvzdXSLOV3ViR0KsAhnhOfyaUjZsQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fix checkpoint skip logic on idle systems by tracking LSN progress  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: Fix checkpoint skip logic on idle systems by tracking LSN progress  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On Tue, Nov 15, 2016 at 9:27 AM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> Hello,
>
> At Mon, 14 Nov 2016 16:53:35 +0530, Amit Kapila <amit.kapila16@gmail.com> wrote in
>> >
>>
>> The progress parameter is used not only for checkpoint activity but by
>> bgwriter as well for logging standby snapshot.  If you want to keep
>> this record under no_progress category (which I don't endorse), then
>> it might be better to add a comment, so that it will be easier for the
>> readers of this code to understand the reason.
>
> I rather agree to that. But how detailed it should be?
>
>>LogAccessExclusiveLocks(int nlocks, xl_standby_lock *locks)
>>{
>>...
>>       XLogRegisterData((char *) locks, nlocks * sizeof(xl_standby_lock));
>>       /* Needs XLOG_SKIP_PROGRESS because called from LogStandbySnapshot */
>>       XLogSetFlags(XLOG_SKIP_PROGRESS);
>
> or
>
>>       /*
>>        * Needs XLOG_SKIP_PROGRESS because called from LogStandbySnapshot.
>>        * See the comment for LogCurrentRunningXact for the detail.
>>        */
>
> or more detiled?
>

I think referring to a place where we have explained why skipping XLOG
progress is okay for this or related WAL records (like comments for
struct WALInsertLock)  will be more suitable.  Also, maybe it is worth
mentioning that this code will skip updating XLOG progress even when
we want to log AccessExclusiveLocks for operations other than a
snapshot.


> The term "WAL activity' is used in the comment for
> GetProgressRecPtr. Its meaning is not clear but not well
> defined. Might need a bit detailed explanation about that or "WAL
> activity tracking". What do you think about this?
>

I would have written it as below:

GetProgressRecPtr -- Returns the WAL progress.  WAL progress is
determined by scanning each WALinsertion lock by taking directly the
light-weight lock associated to it.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Push down more full joins in postgres_fdw
Следующее
От: Andrew Dunstan
Дата:
Сообщение: postgres_fdw and defaults