Dredis.Extensions.Storage.Postgres
1.0.0
dotnet add package Dredis.Extensions.Storage.Postgres --version 1.0.0
NuGet\Install-Package Dredis.Extensions.Storage.Postgres -Version 1.0.0
<PackageReference Include="Dredis.Extensions.Storage.Postgres" Version="1.0.0" />
<PackageVersion Include="Dredis.Extensions.Storage.Postgres" Version="1.0.0" />
<PackageReference Include="Dredis.Extensions.Storage.Postgres" />
paket add Dredis.Extensions.Storage.Postgres --version 1.0.0
#r "nuget: Dredis.Extensions.Storage.Postgres, 1.0.0"
#:package Dredis.Extensions.Storage.Postgres@1.0.0
#addin nuget:?package=Dredis.Extensions.Storage.Postgres&version=1.0.0
#tool nuget:?package=Dredis.Extensions.Storage.Postgres&version=1.0.0
Dredis.Extensions.Storage.Postgres
A PostgreSQL key-value store implementation for Dredis (https://github.com/miserix13/Dredis)
Current implementation scope
The current PostgreSQL-backed milestone covers the full Dredis.Abstractions.Storage.IKeyValueStore contract, including the core string surface plus hashes, lists, sets, sorted sets, JSON, stream, vector, probabilistic, and time-series operations:
GetAsyncSetAsyncGetManyAsyncSetManyAsyncDeleteAsyncExistsAsyncIncrByAsyncExpireAsyncPExpireAsyncTtlAsyncPttlAsyncCleanUpExpiredKeysAsyncHashSetAsyncHashGetAsyncHashDeleteAsyncHashGetAllAsyncListPushAsyncListPopAsyncListRangeAsyncListLengthAsyncListIndexAsyncListSetAsyncListTrimAsyncSetAddAsyncSetRemoveAsyncSetMembersAsyncSetCardinalityAsyncSortedSetAddAsyncSortedSetRemoveAsyncSortedSetRangeAsyncSortedSetCardinalityAsyncSortedSetScoreAsyncSortedSetRangeByScoreAsyncSortedSetIncrementAsyncSortedSetCountByScoreAsyncSortedSetRankAsyncSortedSetReverseRankAsyncSortedSetRemoveRangeByScoreAsyncJsonSetAsyncJsonGetAsyncJsonDelAsyncJsonTypeAsyncJsonStrlenAsyncJsonArrlenAsyncJsonArrappendAsyncJsonArrindexAsyncJsonArrinsertAsyncJsonArrremAsyncJsonArrtrimAsyncJsonMgetAsyncStreamAddAsyncStreamDeleteAsyncStreamLengthAsyncStreamLastIdAsyncStreamReadAsyncStreamRangeAsyncStreamRangeReverseAsyncStreamTrimAsyncStreamInfoAsyncStreamSetIdAsyncStreamGroupCreateAsyncStreamGroupDestroyAsyncStreamGroupSetIdAsyncStreamGroupDelConsumerAsyncStreamGroupReadAsyncStreamAckAsyncStreamPendingAsyncStreamClaimAsyncStreamGroupsInfoAsyncStreamConsumersInfoAsyncVectorSetAsyncVectorGetAsyncVectorSizeAsyncVectorSimilarityAsyncVectorDeleteAsyncVectorSearchAsyncBloomReserveAsyncBloomAddAsyncBloomMAddAsyncBloomExistsAsyncBloomMExistsAsyncBloomInfoAsyncCuckooReserveAsyncCuckooAddAsyncCuckooAddNxAsyncCuckooExistsAsyncCuckooDeleteAsyncCuckooCountAsyncCuckooInfoAsyncHyperLogLogAddAsyncHyperLogLogCountAsyncHyperLogLogMergeAsyncTDigestCreateAsyncTDigestResetAsyncTDigestAddAsyncTDigestQuantileAsyncTDigestCdfAsyncTDigestRankAsyncTDigestRevRankAsyncTDigestByRankAsyncTDigestByRevRankAsyncTDigestTrimmedMeanAsyncTDigestMinAsyncTDigestMaxAsyncTDigestInfoAsyncTopKReserveAsyncTopKAddAsyncTopKIncrByAsyncTopKQueryAsyncTopKCountAsyncTopKListAsyncTopKInfoAsyncTimeSeriesCreateAsyncTimeSeriesAddAsyncTimeSeriesIncrementByAsyncTimeSeriesGetAsyncTimeSeriesRangeAsyncTimeSeriesDeleteAsyncTimeSeriesInfoAsyncTimeSeriesMultiRangeAsync
Internally, the store now uses a shared key metadata table with kind, value, and expires_at columns, plus per-type child tables for hash fields, list items, set members, sorted-set members, stream entries/group state, and time-series samples. JSON documents, vectors, probabilistic structures, and time-series metadata are stored directly in the parent row payload, and streams persist their last-generated id in the parent row while entries, fields, groups, consumers, and pending metadata live in child tables. TTL is tracked on the parent key row and child rows are deleted through foreign-key cascades.
Probabilistic structures currently use exact persisted state to satisfy the upstream API without external PostgreSQL extensions: Bloom filters track exact membership, Cuckoo filters track exact per-item counts, HyperLogLog stores an exact distinct set, TDigest stores exact values, and TopK stores exact counts with deterministic top-k ordering.
Time series use parent-row JSON metadata for retention, duplicate policy, and labels, plus a sample child table keyed by timestamp. Range aggregation currently supports AVG, SUM, MIN, MAX, and COUNT, and multi-range filtering matches exact label pairs while omitting matching series that have no samples in the requested range.
Build and test
dotnet restore .\Dredis.Extensions.Storage.Postgres.slnx
dotnet build .\Dredis.Extensions.Storage.Postgres.slnx -c Release
dotnet test .\Dredis.Extensions.Storage.Postgres.slnx -c Release
The test project includes PostgreSQL integration coverage for the string, hash, list, set, sorted-set, JSON, stream, vector, probabilistic, and time-series slices. Set DREDIS_POSTGRES_TEST_CONNECTION_STRING to run those tests against a real PostgreSQL instance; otherwise the integration tests return early and the rest of the suite still runs.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Dredis.Abstractions.Storage (>= 1.0.0)
- Npgsql (>= 10.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 96 | 4/18/2026 |