On Mon, 18 Oct 2021 at 12:17, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Japin Li <japinli@hotmail.com> writes:
>> On Mon, 18 Oct 2021 at 11:59, Michael Paquier <michael@paquier.xyz> wrote:
>>> dblink.c has something similar as of applyRemoteGucs(), except that it
>>> does not do extra_float_digits. It would be nice to avoid more
>>> duplication for those things, at least on HEAD. On the top of my
>>> head, don't we have something similar for parallel workers when
>>> passing down GUCs from the leader?
>
>> Since it will be used in more than one places. IMO, we can implement it in core.
>> Any thoughts?
>
> It's not going to be the same code everywhere. A logrep sender won't
> have a need to save-and-restore the settings like postgres_fdw does,
Thanks for your explanation. Yeah, we do not need reset the settings in
logical replication.
> AFAICS. Also, now that I look at it, dblink is doing the opposite
> thing of absorbing the sender's values.
>
Sorry I misunderstand. You are right, the dblink applies the remote
server's settings to local server.
Attached v3 patch modify the settings on sender as you suggest.
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.