agora inbox for pgsql-committers@postgresql.orghelp / color / mirror / Atom feed
pgsql: Validate subscription conninfo on owner change 2+ messages / 1 participants [nested] [flat]
* pgsql: Validate subscription conninfo on owner change @ 2026-07-23 10:27 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2026-07-23 10:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Validate subscription conninfo on owner change For subscriptions using SERVER, changing the owner can change the effective connection string. However, ALTER SUBSCRIPTION ... OWNER TO did not validate the generated conninfo for the new owner. As a result, ownership could be transferred to a non-superuser whose generated connection string did not satisfy password_required=true. The ownership change succeeded, but the subscription would fail later when the worker or another command tried to connect. Fix this by making ALTER SUBSCRIPTION ... OWNER TO validate the new owner's generated conninfo with walrcv_check_conninfo(). Backpatch to v19, where SERVER subscriptions were introduced. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Yuanchao Zhang <145zhangyc@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Discussion: https://postgr.es/m/CAHGQGwFGa6+wWVgUmZPFwN=fBY59mYPkMK3=TxT=Pv5C1mNNRQ@mail.gmail.com Backpatch-through: 19 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1c9c35890421e96a91129b51f2c6446a6d95af95 Modified Files -------------- doc/src/sgml/ref/alter_subscription.sgml | 7 +++++++ src/backend/commands/subscriptioncmds.c | 14 ++++++++++++-- src/test/regress/expected/subscription.out | 17 +++++++++++++++++ src/test/regress/regress.c | 9 +++++++++ src/test/regress/sql/subscription.sql | 16 ++++++++++++++++ 5 files changed, 61 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Validate subscription conninfo on owner change @ 2026-07-23 10:27 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 2+ messages in thread From: Fujii Masao @ 2026-07-23 10:27 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Validate subscription conninfo on owner change For subscriptions using SERVER, changing the owner can change the effective connection string. However, ALTER SUBSCRIPTION ... OWNER TO did not validate the generated conninfo for the new owner. As a result, ownership could be transferred to a non-superuser whose generated connection string did not satisfy password_required=true. The ownership change succeeded, but the subscription would fail later when the worker or another command tried to connect. Fix this by making ALTER SUBSCRIPTION ... OWNER TO validate the new owner's generated conninfo with walrcv_check_conninfo(). Backpatch to v19, where SERVER subscriptions were introduced. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Yuanchao Zhang <145zhangyc@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Discussion: https://postgr.es/m/CAHGQGwFGa6+wWVgUmZPFwN=fBY59mYPkMK3=TxT=Pv5C1mNNRQ@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/41be67e534ffccd055922482c17b874fb7a74f30 Modified Files -------------- doc/src/sgml/ref/alter_subscription.sgml | 7 +++++++ src/backend/commands/subscriptioncmds.c | 14 ++++++++++++-- src/test/regress/expected/subscription.out | 17 +++++++++++++++++ src/test/regress/regress.c | 9 +++++++++ src/test/regress/sql/subscription.sql | 16 ++++++++++++++++ 5 files changed, 61 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2026-07-23 10:27 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-07-23 10:27 pgsql: Validate subscription conninfo on owner change Fujii Masao <fujii@postgresql.org> 2026-07-23 10:27 pgsql: Validate subscription conninfo on owner change Fujii Masao <fujii@postgresql.org>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox