Thread: pgsql: Honor run_as_owner option in tablesync worker.
Honor run_as_owner option in tablesync worker. Commit 482675987 introduced "run_as_owner" subscription option so that subscription runs with either the permissions of the subscription owner or the permission of the table owner. However, tablesync workers did not use this option for the initial data copy. With this change, tablesync workers run with appropriate permissions based on "run_as_owner" option. Ajin Cherian, with changes and regression tests added by me. Reported-By: Amit Kapila Author: Ajin Cherian, Masahiko Sawada Reviewed-by: Ajin Cherian, Amit Kapila Discussion: https://postgr.es/m/CAA4eK1L=qzRHPEn+qeMoKQGFBzqGoLBzt_ov0A89iFFiut+ppA@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/a83edeaf684a70da02fa2bce8b7e3aefa3f906f5 Modified Files -------------- src/backend/replication/logical/tablesync.c | 64 ++++++++++++++--------- src/test/subscription/t/033_run_as_table_owner.pl | 38 +++++++++++++- 2 files changed, 75 insertions(+), 27 deletions(-)