@ -196,7 +196,7 @@ expect_replication("alice.unpartitioned", 3, 7, 13,
# Remove the subscrition and truncate the table for the initial data sync
# tests.
$ node_subscriber - > safe_psql (
'postgres' , qq(
'postgres' , qq(
DROP SUBSCRIPTION admin_sub ;
TRUNCATE alice . unpartitioned ;
) ) ;
@ -204,7 +204,7 @@ TRUNCATE alice.unpartitioned;
# Create a new subscription "admin_sub" owned by regress_admin2. It's
# disabled so that we revoke superuser privilege after creation.
$ node_subscriber - > safe_psql (
'postgres' , qq(
'postgres' , qq(
SET SESSION AUTHORIZATION regress_admin2 ;
CREATE SUBSCRIPTION admin_sub CONNECTION '$publisher_connstr' PUBLICATION alice
WITH ( run_as_owner = false , password_required = false , copy_data = true , enabled = false ) ;
@ -214,16 +214,15 @@ WITH (run_as_owner = false, password_required = false, copy_data = true, enabled
# ability to SET ROLE. Then enable the subscription "admin_sub".
revoke_superuser ( "regress_admin2" ) ;
$ node_subscriber - > safe_psql (
'postgres' , qq(
'postgres' , qq(
GRANT regress_alice TO regress_admin2 WITH INHERIT FALSE , SET TRUE ;
ALTER SUBSCRIPTION admin_sub ENABLE ;
) ) ;
# Because the initial data sync is working as the table owner, all
# data should be copied.
$ node_subscriber - > wait_for_subscription_sync ( $ node_publisher ,
'admin_sub' ) ;
$ node_subscriber - > wait_for_subscription_sync ( $ node_publisher , 'admin_sub' ) ;
expect_replication ( "alice.unpartitioned" , 3 , 7 , 13 ,
"table owner can do the initial data copy" ) ;
"table owner can do the initial data copy" ) ;
done_testing ( ) ;