Re: Inconsistency in determining the timestamp of the db statfile.

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Inconsistency in determining the timestamp of the db statfile.
Дата
Msg-id CABUevExtTttBw4O_BQ-yAimvHZiFyK3Otfea8eKTMR=0+e_UJQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Inconsistency in determining the timestamp of the db statfile.  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Inconsistency in determining the timestamp of the db statfile.
Список pgsql-hackers


On Thu, Sep 10, 2020 at 9:05 AM Amit Kapila <amit.kapila16@gmail.com> wrote:
On Thu, Sep 10, 2020 at 11:52 AM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:
>
>
> Regarding the v2 patch, I think we should return false in the
> following case too:
>
>             default:
>                 ereport(pgStatRunningInCollector ? LOG : WARNING,
>                         (errmsg("corrupted statistics file \"%s\"",
>                                 statfile)));
>                 goto done;
>

makes sense, attached find the updated patch.

As a minor nitpick, technically, I think the comment change is wrong, because it says that the caller *must* rely on the timestamp, which it of course doesn't. I think a more proper one is "The caller must not rely on the timestamp in case the function returns false" or "The caller must only rely on the timestamp if the function returns true".

+1 on the code parts.

--

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

Предыдущее
От: Georgios
Дата:
Сообщение: Re: v13: show extended stats target in \d
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Proposals for making it easier to write correct bgworkers