The PostgresqlEventStorageEngine doesn't currently handle the SourcingStrategy.Snapshot on its own, but it does implement SnapshotStore. This means that the decorator SnapshotCapableEventStorageEngine is not applied as it is expected that engines that have their own snapshot store implementation handle this directly (in an optimized way).
What needs to be done
The PostgresqlEventStorageEngine should check the SourcingStrategy and if it is Snapshot it should create the source stream with the snapshot as first (optional) message.
This can be done in an optimized form where only a single round trip is done to the server, as it can directly query the snapshots table, immediately followed with some initial events.
The
PostgresqlEventStorageEnginedoesn't currently handle theSourcingStrategy.Snapshoton its own, but it does implementSnapshotStore. This means that the decoratorSnapshotCapableEventStorageEngineis not applied as it is expected that engines that have their own snapshot store implementation handle this directly (in an optimized way).What needs to be done
The
PostgresqlEventStorageEngineshould check theSourcingStrategyand if it isSnapshotit should create the source stream with the snapshot as first (optional) message.This can be done in an optimized form where only a single round trip is done to the server, as it can directly query the snapshots table, immediately followed with some initial events.