Restart the apply worker if the privileges have been revoked.
authorAmit Kapila <akapila@postgresql.org>
Tue, 17 Oct 2023 03:00:05 +0000 (08:30 +0530)
committerAmit Kapila <akapila@postgresql.org>
Tue, 17 Oct 2023 03:11:44 +0000 (08:41 +0530)
commit79243de13f4d251309d7831744e98d6b965ed4d6
treeaa362194350de89f5356e0921c83ff1268071079
parent2f047203074c643ae458dcf51bbb8ae45dd7e13c
Restart the apply worker if the privileges have been revoked.

Restart the apply worker if the subscription owner's superuser privileges
have been revoked. This is required so that the subscription connection
string gets revalidated and use the password option to connect to the
publisher for non-superusers, if required.

Author: Vignesh C
Reviewed-by: Amit Kapila
Discussion: http://postgr.es/m/CALDaNm2Dxmhq08nr4P6G+24QvdBo_GAVyZ_Q1TcGYK+8NHs9xw@mail.gmail.com
src/backend/catalog/pg_subscription.c
src/backend/commands/subscriptioncmds.c
src/backend/replication/logical/tablesync.c
src/backend/replication/logical/worker.c
src/include/catalog/pg_subscription.h
src/test/subscription/t/027_nosuperuser.pl