Re: [HACKERS] Remove secondary checkpoint

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Remove secondary checkpoint
Дата
Msg-id CAB7nPqQCRMZirimcCog0JPAkNnnQ6gtFwu5HfgZYmZke_16R9g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Remove secondary checkpoint  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: [HACKERS] Remove secondary checkpoint  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Oct 30, 2017 at 2:22 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> On 25 October 2017 at 00:17, Michael Paquier <michael.paquier@gmail.com> wrote:
>> -    * Delete old log files (those no longer needed even for previous
>> -    * checkpoint or the standbys in XLOG streaming).
>> +    * Delete old log files and recycle them
>>      */
>> Here that's more "Delete or recycle old log files". Recycling of a WAL
>> segment is its renaming into a newer segment.
>
> Sometimes files are deleted if there are too many.

Sure, but one segment is never deleted and then recycled, which is
what your new comment implies as I understand it.

>> -               checkPointLoc = ControlFile->prevCheckPoint;
>> +               /*
>> +                * It appears to be a bug that we used to use
>> prevCheckpoint here
>> +                */
>> +               checkPointLoc = ControlFile->checkPoint;
>> Er, no. This is correct because we expect the prior checkpoint to
>> still be present in the event of a failure detecting the latest
>> checkpoint.
>
> I'm removing "prevCheckPoint", so not sure what you mean.

I mean that there is no actual bug here. And changing the code as you
do is correct, but the comment is not.
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] Remove secondary checkpoint
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] How to implement a SP-GiST index as a extension module?