diff --git a/modules/module-postgres/src/replication/WalStream.ts b/modules/module-postgres/src/replication/WalStream.ts index 2b6783a39..01c99082e 100644 --- a/modules/module-postgres/src/replication/WalStream.ts +++ b/modules/module-postgres/src/replication/WalStream.ts @@ -1003,7 +1003,11 @@ WHERE oid = $1::regclass`, // Big caveat: This _must not_ be used to skip individual messages, since this LSN // may be in the middle of the next transaction. // It must only be used to associate checkpoints with LSNs. - await batch.keepalive(chunkLastLsn); + const didCommit = await batch.keepalive(chunkLastLsn); + if (didCommit) { + this.oldestUncommittedChange = null; + } + this.isStartingReplication = false; }