PostgresCheckpointStore.GetLastCheckpoint throws 'duplicate key value violates unique constraint "pk_checkpoints"' when the stream is empty.
When GetLastCheckpoint executes the first time, it creates a checkpoint with a null position. The second time, it loads the checkpoint from the database, but discards it because checkpoint.IsEmpty is true and tries to create a new checkpoint with the same checkpointId. This causes the duplicate key exception.
We are using eventuous version "0.14.1-alpha.0.32".
PostgresCheckpointStore.GetLastCheckpoint throws 'duplicate key value violates unique constraint "pk_checkpoints"' when the stream is empty.
When GetLastCheckpoint executes the first time, it creates a checkpoint with a null position. The second time, it loads the checkpoint from the database, but discards it because checkpoint.IsEmpty is true and tries to create a new checkpoint with the same checkpointId. This causes the duplicate key exception.
We are using eventuous version "0.14.1-alpha.0.32".