Re: DOCS - Clarify the publication 'publish_via_partition_root' default value. - Mailing list pgsql-hackers

From Chao Li
Subject Re: DOCS - Clarify the publication 'publish_via_partition_root' default value.
Date
Msg-id 589A5246-7E70-4E2D-BBA0-3DD8B8AB78C5@gmail.com
Whole thread Raw
In response to Re: DOCS - Clarify the publication 'publish_via_partition_root' default value.  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers

> On Dec 15, 2025, at 08:25, Peter Smith <smithpb2250@gmail.com> wrote:
>
> On Fri, Dec 12, 2025 at 12:32 PM Chao Li <li.evan.chao@gmail.com> wrote:
>>
>>
>>
>>> On Dec 12, 2025, at 07:12, Jacob Champion <jacob.champion@enterprisedb.com> wrote:
>>>
>>> On Thu, Dec 11, 2025 at 12:22 PM Peter Smith <smithpb2250@gmail.com> wrote:
>>>>> Why not just say clearly what the default value is?
>>>>>
>>>>> PSA: a patch to do that.
>>>
>>> LGTM. (In fact I've read that paragraph three times and still cannot
>>> get it to stick in my head, despite having done a fair amount of
>>> thinking about publish_via_partition_root, so if you have further
>>> improvement ideas I'm all ears.)
>>>
>
> Yeah, I proposed only a very small patch instead of a rewrite only
> because I thought it would have a better chance of acceptance, not
> because I had any love for the rest of that paragraph.
>
>>
>> My feeling is that the preceding long sentence has described both sides expect explicitly mentioning true and false,
whichmakes the following sentence, no matter the original version and the patched version sounds slightly redundant. So
Ithink maybe we can rework the entire paragraph like: 
>>
>> ```
>> This parameter controls how changes to a partitioned table (or any of its partitions) are published. When set to
true,changes are published using the identity and schema of the partitioned table. When set to false (the default),
changesare published using the identity and schema of the individual partitions 
>> where the changes actually occurred. Enabling this option allows the changes to be replicated into a non-partitioned
tableor into a partitioned table whose 
>> partition structure differs from that of the publisher.
>> ```
>>
>
> AFAIK, Chao's improved text is mostly good, except I think there might
> be some nuances when there are multiple levels of partitioning.
>
> For example, maybe you need to make this change?
> BEFORE
> When set to true, changes are published using the identity and schema
> of the partitioned table
> AFTER
> When set to true, changes are published using the identity and schema
> of the root partitioned table
> ~~~

Agreed to add “root”.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PATCH] Refactor bytea_sortsupport(), take two
Next
From: Amit Kapila
Date:
Subject: Re: [BUG] [PATCH] Allow physical replication slots to recover from archive after invalidation