Ensure replication slots can be dropped by a replication-only user

If the repmgr user is a non-superuser, and a replication-only user exists,
ensure redundant replication slots are dropped correctly.
This commit is contained in:
Ian Barwick
2022-05-16 16:35:50 +09:00
parent cce5ca2245
commit a90d1cf3dd
5 changed files with 133 additions and 76 deletions

View File

@@ -3348,10 +3348,9 @@ do_standby_follow_internal(PGconn *primary_conn, PGconn *follow_target_conn, t_n
update_node_record_slot_name(primary_conn, config_file_options.node_id, local_node_record.slot_name);
}
if (create_replication_slot(follow_target_conn,
local_node_record.slot_name,
NULL,
follow_target_node_record,
output) == false)
{
log_error("%s", output->data);