opensearch-project / opensearch-project/data-prepper

[BUG] Rds source getTableNames method requires REPLICATION priviledge

Open
#6,329 0 comments 0 reactions 1 assignee View on GitHub

@oeyh is already working on this.

Since Dec 9, 2025.

bug
Dominant language
Java
Stars
374
Forks
354
Avg merge
3d 18h
Merged PRs (30d)
8

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:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.