Error: Permission Denied to Start WAL Sender
Issue
Connection setup tests succeed, but syncs fail with the following error:
Unknown failure. Unhandled Classified Exception. permission denied to start WAL sender Detail: Only roles with the REPLICATION attribute or privileges of the "rds_replication" role may start a WAL sender process.
Environment
- Connector: Amazon RDS PostgreSQL or Amazon Aurora PostgreSQL
- Incremental sync method: Logical replication
Resolution
To resolve this issue:
- Grant the
rds_replicationrole to the configured Fivetran user by running the following command:GRANT rds_replication TO <username>; - Ensure the user automatically inherits the role's privileges:
ALTER ROLE <username> INHERIT; - Re-run the sync.
Cause
This issue occurs when the Fivetran database user doesn't have the rds_replication role or doesn't inherit its privileges.
You can run the following query as the Fivetran user to verify its role membership and active privileges:
SELECT
current_user,
session_user,
current_database(),
inet_server_addr(),
inet_server_port(),
pg_has_role(current_user, 'rds_replication', 'MEMBER') AS is_member,
pg_has_role(current_user, 'rds_replication', 'USAGE') AS privilege_is_active;
- If
is_memberreturnsfalse, the user hasn't been granted therds_replicationrole. - If
is_memberreturnstrueandprivilege_is_activereturnsfalse, the user has the role but doesn't inherit its privileges.