Re: Document default values for pgoutput options + fix missing initialization for "origin"

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, masao(dot)fujii(at)oss(dot)nttdata(dot)com
Subject: Re: Document default values for pgoutput options + fix missing initialization for "origin"
Date: 2025-05-20 04:09:44
Message-ID: CAA4eK1+B17W4_RduG1DETpAkTh7vxz=VpqmqHtRtwW3vZrW5Ng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 20, 2025 at 8:11 AM Euler Taveira <euler(at)eulerto(dot)com> wrote:
>
> On Fri, May 16, 2025, at 12:06 PM, Fujii Masao wrote:
>
> The pgoutput plugin options are documented in the logical streaming
> replication protocol, but their default values are not mentioned.
> This can be inconvenient for users - for example, when using pg_recvlogical
> with pgoutput plugin and needing to know the default behavior of each option.
> https://www.postgresql.org/docs/devel/protocol-logical-replication.html
>
> I'd like to propose adding the default values to the documentation to
> improve clarity and usability. Patch attached (0001 patch).
>
>
> Good catch.
>
> Should we use "on" and "off" as other enum GUCs (wal_compression,
> recovery_prefetch, compute_query_id)? The current convention is to support
> other ways (true / false / 1 / 0) to write boolean but only document one way
> (on / off).
>
> Since you are changing this page, I would like to suggest removing "Boolean"
> from streaming option. It is not a boolean anymore since protocol version 4.
> The suggested description is:
>
> + Option to enable streaming of in-progress transactions. Valid values are
> + <literal>off</literal> (the default), <literal>on</literal> and
> + <literal>parallel</literal>. The setting <literal>parallel</literal>
> + enables sending extra information with some messages to be used for
> + parallelization. Minimum protocol version 2 is required to turn it
> + <literal>on</literal>. Minimum protocol version 4 is required for the
> + <literal>parallel</literal> value.
>

One point to note about this is that we change the default value for
the streaming option to parallel for a subscription in the commit
1bf1140be8. But pgoutput still considers the default value to be off.
I thought about this, but not sure if there is any clear value in
changing the default of pgoutput. Would you have any thoughts on the
same?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2025-05-20 04:24:23 Re: Logical Replication of sequences
Previous Message Tom Lane 2025-05-20 04:07:23 Re: wrong query results on bf leafhopper