Skip to content

Commit f5ec031

Browse files
committed
Cover case of no tables to snapshot.
1 parent ce500a1 commit f5ec031

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/module-postgres/src/replication/PostgresSnapshotter.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ export class PostgresSnapshotter {
344344
}
345345

346346
async replicationLoop() {
347+
if (this.queue.size == 0) {
348+
// Special case where we start with no tables to snapshot
349+
await this.markSnapshotDone();
350+
}
347351
while (!this.abort_signal.aborted) {
348352
const table = this.queue.values().next().value;
349353
if (table == null) {

0 commit comments

Comments
 (0)