Aurora PostgreSQL Source Returns a Permission Denied Error After HVR Upgrade
Issue
After upgrading HVR Hub from version 6.2.0/26 to 6.3.0/4, your Amazon Aurora PostgreSQL source returns the following error during Activate Replication or initial publication creation:
ERROR: permission denied for database <database>
Environment
- HVR 6
- Connector type: PostgreSQL on Amazon Aurora
- HVR Hub version: 6.3.0/4 (upgrade from 6.2.0/26)
Resolution
To resolve this issue, use one of the following options:
Temporarily grant elevated privileges
Temporarily grant the HVR source database user rds_superuser or equivalent privileges on the Aurora instance. These elevated privileges are typically required only during the Activate Replication step, when we create or manage the publication.
Manually create the publication
Ask a database administrator to manually create the publication in the source database before you run Activate Replication. The publication name must match the name we expect. Check the error log or your HVR configuration for the expected name.
After the publication is created, rerun activation without selecting the Publication component in the Activate Replication dialog. This prevents us from trying to recreate the publication.
Cause
This issue occurs when HVR 6.3.x tries to create or manage a publication automatically during Activate Replication. Since version 6.2.5/0, we default to the pgoutput logical replication plugin for PostgreSQL, which requires a publication. After you upgrade from 6.2.0/26 to 6.3.0/4, activation fails if the source database user doesn't have sufficient privileges to run CREATE PUBLICATION on the Aurora instance.