Important
This repository is obsolete and has been archived in favor of the monorepo fedify-dev/fedify.
This package provides Fedify's KvStore and MessageQueue
implementations for PostgreSQL:
import{createFederation}from"@fedify/fedify";import{PostgresKvStore,PostgresMessageQueue}from"@fedify/postgres";importpostgresfrom"postgres";constsql=postgres("postgresql://user:password@localhost/dbname");constfederation=createFederation({kv: newPostgresKvStore(sql),queue: newPostgresMessageQueue(sql),});deno add @fedify/postgresnpm install @fedify/postgresbun add @fedify/postgresTo be released.
Released on March 28, 2025.
Added
PostgresMessageQueue.enqueueMany()method for efficiently enqueuing multiple messages at once.Updated @js-temporal/polyfill to 0.5.0 for Node.js and Bun. On Deno, there is no change because the polyfill is not used.
Added some logging using LogTape for the sake of debugging. The following categories are used:
["fedify", "postgres", "kv"]["fedify", "postgres", "mq"]
Released on November 18, 2024.
- Fixed a bug where binding parameters have not been properly escaped with some settings of Postgres.js.
Released on November 3, 2024.
- Fixed a bug where some scalar values have failed to be stored in the database.
Released on November 3, 2024.
Fixed a bug where JSON values are double-quoted in the database. Since it's a breaking change data-wise, the default values of the following options are also changed:
PostgresKvStoreOptions.tableNamedefaults to"fedify_kv_v2".PostgresMessageQueueOptions.tableNamedefaults to"fedify_message_v2".
Initial release. Released on September 26, 2024.