Re: Extra XLOG in Checkpoint for StandbySnapshot

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: Extra XLOG in Checkpoint for StandbySnapshot
Дата
Msg-id 002601cdecdb$989c3760$c9d4a620$@kapila@huawei.com
обсуждение исходный текст
Ответ на Re: Extra XLOG in Checkpoint for StandbySnapshot  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Extra XLOG in Checkpoint for StandbySnapshot  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Monday, January 07, 2013 6:30 PM Simon Riggs wrote:
> On 7 January 2013 12:39, Amit Kapila <amit.kapila@huawei.com> wrote:
> 
> > So We can modify to change this in function LogStandbySnapshot as
> below:
> >                 running = GetRunningTransactionData();
> >                 if (running->xcnt > 0)
> >                         LogCurrentRunningXacts(running);
> >
> > So this check will make sure that if there is no operation happening
> i.e. no
> > new running transaction, then no need to log running transaction
> snapshot
> > and hence further checkpoint operations will be skipped.
> >
> > Let me know if I am missing something?
> 
> It's not the same test. The fact that nothing is running at that
> moment is not the same thing as saying nothing at all has run since
> last checkpoint.

But isn't the functionality of LogStandbySnapshot() is to log "all running
xids" and "all current 
AccessExclusiveLocks". For RunningTransactionLocks, WAL is avoided in
similar way.

> If we skip the WAL record in the way you suggest, we'd be unable to
> start quickly in some cases.

If there are any operations happened which have generated WAL, then on next
checkpoint interval the checkpoint operation should happen. 
Which cases will it not able to start quickly?

With Regards,
Amit Kapila




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

Предыдущее
От: "孟庆钟"
Дата:
Сообщение: A very small typo in the comment
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Improve compression speeds in pg_lzcompress.c