-
Notifications
You must be signed in to change notification settings - Fork 286
Description
Describe the bug
Rds source requires Replication permission for non-replication operations.
For example, I see this error is:
org.opensearch.dataprepper.plugins.source.rds.schema.PostgresSchemaManager - Failed to get table names, retrying
org.postgresql.util.PSQLException: FATAL: permission denied to start WAL sender
Detail: Only roles with the REPLICATION attribute may start a WAL sender process.
...
at org.opensearch.dataprepper.plugins.source.rds.schema.PostgresSchemaManager.getTableNames(PostgresSchemaManager.java:212)
...
The reason is that the rds source establish a replication connection to database to perform all needed operations, like get table names and schemas, stream CDC data, etc. However, some operations doesn't need a replication connection.
It shouldn't be an issue if the pipeline has stream enabled; but if a user only wants to do export, Replication permission (only needed for stream) shouldn't be required.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
getTableNames method should only require SELECT permissions. We probably need to establish separate connection for non-replication operations.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: [e.g. Ubuntu 20.04 LTS]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status