]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Honor GUC settings specified in CREATE SUBSCRIPTION CONNECTION.
authorFujii Masao <fujii@postgresql.org>
Tue, 6 Jan 2026 02:54:46 +0000 (11:54 +0900)
committerFujii Masao <fujii@postgresql.org>
Tue, 6 Jan 2026 02:55:46 +0000 (11:55 +0900)
commitf7eb44e0f0871e13188f50b0f21d52c10337a60a
treee6d772334232bca50c7b91352bb4b900efddc9e7
parent4ece4419b496ac45e8fb1ad1fd068cf036dd302b
Honor GUC settings specified in CREATE SUBSCRIPTION CONNECTION.

Prior to v15, GUC settings supplied in the CONNECTION clause of
CREATE SUBSCRIPTION were correctly passed through to
the publisher's walsender. For example:

        CREATE SUBSCRIPTION mysub
            CONNECTION 'options=''-c wal_sender_timeout=1000'''
            PUBLICATION ...

would cause wal_sender_timeout to take effect on the publisher's walsender.

However, commit f3d4019da5d changed the way logical replication
connections are established, forcing the publisher's relevant
GUC settings (datestyle, intervalstyle, extra_float_digits) to
override those provided in the CONNECTION string. As a result,
from v15 through v18, GUC settings in the CONNECTION string were
always ignored.

This regression prevented per-connection tuning of logical replication.
For example, using a shorter timeout for walsender connecting
to a nearby subscriber and a longer one for walsender connecting
to a remote subscriber.

This commit restores the intended behavior by ensuring that
GUC settings in the CONNECTION string are again passed through
and applied by the walsender, allowing per-connection configuration.

Backpatch to v15, where the regression was introduced.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Japin Li <japinli@hotmail.com>
Discussion: https://postgr.es/m/CAHGQGwGYV+-abbKwdrM2UHUe-JYOFWmsrs6=QicyJO-j+-Widw@mail.gmail.com
Backpatch-through: 15
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c