Re: [PATCH] XLogReadRecord returns pointer to currently read page

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] XLogReadRecord returns pointer to currently read page
Дата
Msg-id 20181120013056.GH4400@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PATCH] XLogReadRecord returns pointer to currently read page  (Andrey Lepikhov <a.lepikhov@postgrespro.ru>)
Ответы Re: [PATCH] XLogReadRecord returns pointer to currently read page  (Andrey Lepikhov <a.lepikhov@postgrespro.ru>)
Список pgsql-hackers
On Mon, Nov 19, 2018 at 10:48:06AM +0500, Andrey Lepikhov wrote:
> According to my experience, I clarify some comments to avoid this mistakes
> in the future (see attachment).

No objections from here.

> - * The returned pointer (or *errormsg) points to an internal buffer that's
> - * valid until the next call to XLogReadRecord.
> + * The returned pointer (or *errormsg) points to an internal read-only buffer
> + * that's valid until the next call to XLogReadRecord.

Not sure that this bit adds much.

> -    /* Buffer for current ReadRecord result (expandable) */
> +    /*
> +     * Buffer for current ReadRecord result (expandable).
> +     * Used in the case, than current ReadRecord result don't fit on the
> +     * currently read WAL page.
> +     */

Yeah, this one is not entirely true now.  What about the following
instead:
-   /* Buffer for current ReadRecord result (expandable) */
+   /*
+    * Buffer for current ReadRecord result (expandable), used when a record
+    * crosses a page boundary.
+    */
--
Michael

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: ToDo: show size of partitioned table
Следующее
От: Andrey Lepikhov
Дата:
Сообщение: Re: [PATCH] XLogReadRecord returns pointer to currently read page