Document default values for pgoutput options + fix missing initialization for "origin"
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-05-16T15:06:46Z
Lists: pgsql-hackers
Attachments
- v1-0001-doc-Document-default-values-for-pgoutput-options-.patch (text/plain) patch v1-0001
- v1-0002-pgoutput-Initialize-missing-default-for-origin-pa.patch (text/plain) patch v1-0002
Hi, 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). While working on this, I also noticed that although most optional parameters (like "binary") are explicitly initialized in parse_output_parameters(), the "origin" parameter is not. Its value (PGOutputData->publish_no_origin) is implicitly set to false due to zero-initialization, but unlike other parameters, it lacks an explicit default assignment. To ensure consistency and make the behavior clearer, I propose explicitly initializing the "origin" parameter as well. A patch for this is also attached (0002 patch). Thoughts? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pgoutput: Initialize missing default for "origin" parameter.
- b8341ae856f2 19 (unreleased) landed
-
doc: Document default values for pgoutput options in protocol.sgml.
- d8425811b681 19 (unreleased) landed
-
doc: Fix confusing description of streaming option in START_REPLICATION.
- e92573917a49 16.10 landed
- 488c35f958e7 17.6 landed
- ac7c04483106 18.0 landed
- 09fcc652fefd 19 (unreleased) landed
-
Change the default value of the streaming option to 'parallel'.
- 1bf1140be872 18.0 cited
-
Allow users to skip logical replication of data having origin.
- 366283961ac0 16.0 cited