1 Answer
- Newest
- Most votes
- Most comments
0
The problem was that I was using the wrong connection
. I had a HikariCP, and thought I could just take one of the connections from it.
But what you need to do, is to create a specific 'replication' connection. Something like:
Properties props = new Properties();
PGProperty.USER.set(props, "user");
PGProperty.PASSWORD.set(props, "pass");
PGProperty.ASSUME_MIN_SERVER_VERSION.set(props, "9.4");
PGProperty.REPLICATION.set(props, "database");
PGProperty.PREFER_QUERY_MODE.set(props, "simple");
Connection con = DriverManager.getConnection(url, props);
answered 2 years ago
Relevant content
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- How do I end long-running queries in my Amazon RDS for PostrgreSQL or Aurora PostgreSQL DB instance?AWS OFFICIALUpdated 10 months ago