Skip to content
Permalink
Browse files

bug: floating logical replcation test (#829)

```
ERROR: replication slot "pgjdbc_logical_replication_slot" is active for PID 19978
```

After close replication slot, postgresql require some times to kill
previous session before start new, that why need wait when previous session
die before restart replication replication via replication slot.

More correct way, it's use
org.postgresql.replication.PGReplicationStream#close, in that case not
necessary wait when previous session die, but current version postgresql still
have a bug that not allow stop replication fast enough[1].

1. http://www.postgresql.org/message-id/CAFgjRd3hdYOa33m69TbeOfNNer2BZbwa8FFjt2V5VFzTBvUU3w@mail.gmail.com
  • Loading branch information
Gordiychuk authored and davecramer committed May 21, 2017
1 parent 4ac7488 commit 2d3e8972a0b34106a8b7426619cabf852c38ddaa
Showing with 2 additions and 0 deletions.
  1. +2 −0 pgjdbc/src/test/java/org/postgresql/replication/LogicalReplicationTest.java
@@ -443,6 +443,8 @@ public void testRepeatWalPositionTwice() throws Exception {
result.addAll(receiveMessage(stream, 3));

replConnection.close();
waitStopReplicationSlot();

replConnection = openReplicationConnection();
pgConnection = (PGConnection) replConnection;

0 comments on commit 2d3e897

Please sign in to comment.
You can’t perform that action at this time.