[PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

Поиск
Список
Период
Сортировка
Искать

[PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

От:
"Ryo Matsumura (Fujitsu)" <matsumura.ryo@fujitsu.com>
Дата:
Вложения:
Hi Hackers,

It looks like the EXPLAIN documentation is missing an explanation of the default values for the BUFFERS and SERIALIZE options.
I've attached a patch that adds this information.
While the documentation currently notes that these options are implicitly enabled when ANALYZE is specified, the default values of the parameters themselves do not appear to be documented.

Best Regards
Ryo Matsumura

Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Fri, Mar 13, 2026 at 5:38 PM Ryo Matsumura (Fujitsu)
 wrote:
>
> Hi Hackers,
>
> It looks like the EXPLAIN documentation is missing an explanation of the default values for the BUFFERS and SERIALIZE options.
> I've attached a patch that adds this information.
> While the documentation currently notes that these options are implicitly enabled when ANALYZE is specified, the default values of the parameters themselves do not appear to be documented.

+1 to adding a description of the default value.


       format, only non-zero values are printed.  Buffers information is
       automatically included when ANALYZE is used.
+      It defaults to FALSE.

How about clarifying the default depending on whether ANALYZE is used?
For example:

        When ANALYZE is used, this parameter defaults to TRUE and buffer usage
        information is included. Otherwise, it defaults to FALSE.


       argument, TEXT is assumed.
+      It defaults to FALSE.

Does SERIALIZE actually accept FALSE?

Regards,

-- 
Fujii Masao


Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

От:
"Ryo Matsumura (Fujitsu)" <matsumura.ryo@fujitsu.com>
Дата:
Вложения:
On Fri, Mar 13, 2026 at 14:38 UTC, Fujii Masao <masao.fujii@gmail.com> wrote:
>        When ANALYZE is used, this parameter defaults to TRUE and buffer usage
>        information is included. Otherwise, it defaults to FALSE.

Thanks for the comment. I hadn’t understood the implementation correctly.
It might also be worth clarifying that even when the BUFFERS(and WAL) is set to TRUE,
values are shown only when there is something to report as follows:

BUFFERS
       The number of blocks shown for an
       upper-level node includes those used by all its child nodes.  In text
-      format, only non-zero values are printed.  Buffers information is
-      automatically included when <literal>ANALYZE</literal> is used.
+      format, only non-zero values are printed.
+      When ANALYZE is used, this parameter defaults to <literal>TRUE</literal>
+      and buffer usage information is included.
+      Otherwise, it defaults to <literal>FALSE</literal>.
+      When the <literal>FORMAT</literal> is <literal>TEXT</literal>,
+      no output is produced unless there is something to report, even if it
+      is set to <literal>TRUE</literal>.

WAL
       In text format, only non-zero values are printed.
       This parameter may only be used when <literal>ANALYZE</literal> is also
       enabled.  It defaults to <literal>FALSE</literal>.
+      When the <literal>FORMAT</literal> is <literal>TEXT</literal>,
+      no output is produced unless there is something to report, even if it
+      is set to <literal>TRUE</literal>.


> Does SERIALIZE actually accept FALSE?

This was entirely my mistake. And the default value was already documented.


Best Regards
Ryo Matsumura

Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Mon, Mar 16, 2026 at 6:37 PM Ryo Matsumura (Fujitsu)
 wrote:
>
> On Fri, Mar 13, 2026 at 14:38 UTC, Fujii Masao  wrote:
> >        When ANALYZE is used, this parameter defaults to TRUE and buffer usage
> >        information is included. Otherwise, it defaults to FALSE.
>
> Thanks for the comment. I hadn’t understood the implementation correctly.
> It might also be worth clarifying that even when the BUFFERS(and WAL) is set to TRUE,
> values are shown only when there is something to report as follows:

Isn't the existing description "In text format, only non-zero values
are printed." sufficient?

Regards,

-- 
Fujii Masao


Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

От:
Matsumura, Ryo/松村 量 <matsumura.ryo@fujitsu.com>
Дата:
Вложения:
On Mon, Mar 16, 2026 at 10:30:00 +0000, Fujii Masao <masao.fujii@gmail.com> wrote:
> Isn't the existing description "In text format, only non-zero values
> are printed." sufficient?

This description is sufficient. It was a careless mistake on my part. Sorry about that.

I’ve attached a revised patch.

Best Regards
Ryo Matsumura

Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
Вложения:
On Tue, Mar 17, 2026 at 7:26 PM Matsumura, Ryo/松村 量
 wrote:
>
> On Mon, Mar 16, 2026 at 10:30:00 +0000, Fujii Masao  wrote:
> > Isn't the existing description "In text format, only non-zero values
> > are printed." sufficient?
>
> This description is sufficient. It was a careless mistake on my part. Sorry about that.
>
> I’ve attached a revised patch.

Thanks for updating the patch!

Since the docs already state that buffer usage is automatically included
when ANALYZE is used, the focus here seems to be clarifying the behavior
of BUFFERS without ANALYZE. From that perspective, it might be better to
explicitly describe what happens when BUFFERS is TRUE without ANALYZE.

I've updated the patch accordingly. Patch attached. Thought?

Regards,

-- 
Fujii Masao

Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

От:
"Ryo Matsumura (Fujitsu)" <matsumura.ryo@fujitsu.com>
Дата:
On Tue, Mar 17, 2026 at 15:34:00 +0000, Fujii Masao <masao.fujii@gmail.com> wrote:
> Since the docs already state that buffer usage is automatically included
> when ANALYZE is used, the focus here seems to be clarifying the behavior
> of BUFFERS without ANALYZE. From that perspective, it might be better to
> explicitly describe what happens when BUFFERS is TRUE without ANALYZE.
> I've updated the patch accordingly. Patch attached. Thought?

I have no objections. Sorry for my shallow understanding.

Best Regards
Ryo Matsumura

Re: [PATCH] Docs: clarify default values of EXPLAIN BUFFERS and SERIALIZE

От:
Fujii Masao <masao.fujii@gmail.com>
Дата:
On Wed, Mar 18, 2026 at 7:09 PM Ryo Matsumura (Fujitsu)
 wrote:
>
> On Tue, Mar 17, 2026 at 15:34:00 +0000, Fujii Masao  wrote:
> > Since the docs already state that buffer usage is automatically included
> > when ANALYZE is used, the focus here seems to be clarifying the behavior
> > of BUFFERS without ANALYZE. From that perspective, it might be better to
> > explicitly describe what happens when BUFFERS is TRUE without ANALYZE.
> > I've updated the patch accordingly. Patch attached. Thought?
>
> I have no objections.

I've pushed the patch. Thanks!

Regards,

-- 
Fujii Masao


FAQ