Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ Version 2.0.35

To be released.

### @fedify/postgres

- `PostgresKvStore` no longer scans the entire table for expired entries
after every write. Cleanup now deletes up to 1,000 rows per batch,
including across partitioned or inherited tables, with a delay between
attempts that shortens after a full batch. Store
instances sharing a table do not sweep it concurrently. With a pooled
client, writes no longer wait for cleanup, and a cleanup failure no longer
fails the write. Caller-owned transactions and reserved connections still
await cleanup and propagate its errors to avoid hiding a rollback. Reads
continue to exclude expired entries before physical deletion.
[[#1308], [#1314]]
- Fixed `PostgresKvStore.set()` retaining an old creation time when
replacing an existing key. TTLs are now measured from the SQL statement
clock on both insert and update, and expiration checks use that same clock
inside caller-owned transactions. Replacing an expired value works before
its row is physically deleted, and a replacement written with a zero TTL
still reads as absent. [[#1308], [#1314]]

[#1308]: https://github.com/fedify-dev/fedify/issues/1308
[#1314]: https://github.com/fedify-dev/fedify/pull/1314

### @fedify/testing

- Fixed missing runtime dependencies in the npm package. `@fedify/vocab`
Expand Down
21 changes: 21 additions & 0 deletions changes.d/postgres/postgres-kv-expiry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
links:
'#1308': https://github.com/fedify-dev/fedify/issues/1308
'#1314': https://github.com/fedify-dev/fedify/pull/1314
---
- `PostgresKvStore` no longer scans the entire table for expired entries
after every write. Cleanup now deletes up to 1,000 rows per batch,
including across partitioned or inherited tables, with a delay between
attempts that shortens after a full batch. Store
instances sharing a table do not sweep it concurrently. With a pooled
client, writes no longer wait for cleanup, and a cleanup failure no longer
fails the write. Caller-owned transactions and reserved connections still
await cleanup and propagate its errors to avoid hiding a rollback. Reads
continue to exclude expired entries before physical deletion.
[[#1308], [#1314]]
- Fixed `PostgresKvStore.set()` retaining an old creation time when
replacing an existing key. TTLs are now measured from the SQL statement
clock on both insert and update, and expiration checks use that same clock
inside caller-owned transactions. Replacing an expired value works before
its row is physically deleted, and a replacement written with a zero TTL
still reads as absent. [[#1308], [#1314]]
Loading
Loading