Skip to content

Commit cd19ba2

Browse files
committed
Fix snapshot_lsn in postgres storage.
1 parent 29f4302 commit cd19ba2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/module-postgres-storage/src/storage/batch/PostgresBucketBatch.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,10 @@ export class PostgresBucketBatch
355355
COALESCE(sr.keepalive_op, 0)
356356
)
357357
ELSE sr.last_checkpoint
358+
END,
359+
snapshot_lsn = CASE
360+
WHEN selected.can_checkpoint THEN NULL
361+
ELSE sr.snapshot_lsn
358362
END
359363
FROM
360364
selected
@@ -438,7 +442,6 @@ export class PostgresBucketBatch
438442
SET
439443
snapshot_done = TRUE,
440444
last_keepalive_ts = ${{ type: 1184, value: new Date().toISOString() }},
441-
snapshot_lsn = NULL,
442445
no_checkpoint_before = CASE
443446
WHEN no_checkpoint_before IS NULL
444447
OR no_checkpoint_before < ${{ type: 'varchar', value: no_checkpoint_before_lsn }} THEN ${{

0 commit comments

Comments
 (0)