Skip to content

Releases

pg_redis_core v0.6.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 17:31
8e15cf1

Added

  • Multiple Logical Redis Databases (SELECT 0..N-1, pg_redis.databases):
    • Added pg_redis.databases GUC (default 16, range 1–1024, SIGHUP) matching standard Redis behavior so clients like ioredis, BullMQ, redis-py, go-redis/v9, and Jedis can connect to numbered databases (redis://host:6379/1, SELECT 2, etc.).
    • Added db SMALLINT NOT NULL DEFAULT 0 column and composite (db, ...) primary keys/indexes across all 7 catalog tables (pg_redis_strings, pg_redis_key_expiry, pg_redis_hashes, pg_redis_lists, pg_redis_zsets, pg_redis_sets, pg_redis_streams) while keeping SQL inspection clean (WHERE db = 0) and preserving all existing DB 0 rows.
    • Scoped L1 hot-key cache (L1Cache), blocking KeyNotifier wakeups (BZPOPMIN, BLPOP, XREAD BLOCK), Lua 5.1 EVAL/EVALSHA, universal TTL eviction, DBSIZE, KEYS, SCAN, and all 6 data types per (db, key). Pub/Sub remains global across databases (matching real Redis).
    • Updated FLUSHDB [ASYNC|SYNC] to clear only the currently selected database while FLUSHALL [ASYNC|SYNC] clears all databases.
    • Added MOVE key db (atomically moving keys + TTL without overwriting destination keys) and SWAPDB index1 index2 (atomically swapping two databases).
    • Exposed databases in INFO # Server and dynamic CONFIG GET databases.
  • Upgrade Script & Tests:
    • Added sql/pg_redis_core--0.5.0--0.6.0.sql (plus startup ensure_schema() safety-net migration) to cleanly migrate pre-0.6.0 tables with zero data loss.
    • Added tests/clients/pubsub/test_multidb.mjs (wired into tests/run_all_tests.sh) and pg_test_multi_database_isolation_and_ops in src/lib.rs.

Prebuilt Extension Binaries (SHA-256)

135ca44bd1b35bc1af9a050cc0c0524dc9e1ffe88bba5e421f215295f2def3b3  pg_redis_core-0.6.0-pg16-linux-arm64.tar.gz
7841f877333534a3755afc42307d87d74c5ca485a01fff44d5fb6a5f6bfe2fc1  pg_redis_core-0.6.0-pg15-linux-arm64.tar.gz
92ae08f9f3abb63cf1994520f6a12f2b83baadd6fe8ba7d17c05d76eed91b94d  pg_redis_core-0.6.0-pg15-linux-amd64.tar.gz
cdbf11b154a7fe16b206c84ce61046b2ec00fb1b562ab71648eb3bc989df53d1  pg_redis_core-0.6.0-pg16-linux-amd64.tar.gz

Docker Images (Multi-Arch: linux/amd64, linux/arm64)

# PostgreSQL 15
docker pull ghcr.io/megacoderkim/pg2redis:v0.6.0-pg15

# PostgreSQL 16
docker pull ghcr.io/megacoderkim/pg2redis:v0.6.0-pg16

Documentation

https://megacoderkim.github.io/pg2redis/

pg_redis_core v0.5.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 16:54
e940c62

Added

  • Optional Native TLS (rediss://) & mTLS (src/tls.rs, src/worker.rs, src/config.rs):
    • Strictly opt-in via pg_redis.tls_port (default 0, disabled) so plain non-TLS TCP on port 6379 continues working unchanged by default.
    • Supports all three deployment modes:
      1. Plain TCP only (default): pg_redis.port = 6379, pg_redis.tls_port = 0.
      2. Dual-port (Plain TCP + TLS simultaneously): pg_redis.port = 6379, pg_redis.tls_port = 6380 with pg_redis.tls_cert_file and pg_redis.tls_key_file.
      3. TLS-only (Encrypted only): pg_redis.port = 0, pg_redis.tls_port = 6380 (mirrors Redis port 0 + tls-port).
    • Optional mutual TLS (mTLS) client certificate authentication via pg_redis.tls_ca_cert_file and pg_redis.tls_auth_clients (no | optional | yes).
    • Built on pure-Rust tokio-rustls + ring (TLS 1.2 & TLS 1.3) to avoid OpenSSL/libssl symbol conflicts with PostgreSQL, with non-blocking 10-second handshake timeouts so stalled handshakes never affect other clients.
    • Live Certificate Hot-Reload on SIGHUP: SELECT pg_reload_conf(); reloads pg_redis.tls_cert_file, pg_redis.tls_key_file, pg_redis.tls_ca_cert_file, and pg_redis.tls_auth_clients without restarting PostgreSQL (keeping the previous working configuration on reload error).
    • Exposed tls_port in INFO # Server and tls-port / tls-auth-clients in CONFIG GET.
  • Upgrade Script & E2E Tests:
    • Added sql/pg_redis_core--0.4.1--0.5.0.sql.
    • Added tests/test_v050_tls.sh and tests/clients/pubsub/test_tls.mjs verifying dual-port mode (ioredis + redis-cli --tls, cross-transport Pub/Sub, BZPOPMIN over TLS, plaintext rejection on TLS port), TLS-only + mTLS enforcement, and live SIGHUP certificate hot-reload, plus #[pg_test] opt-in default checks.

Prebuilt Extension Binaries (SHA-256)

0bb7a8efb5ba9b70478d006d6146e911a4c02462e1231fe4483df177f3b6a1e9  pg_redis_core-0.5.0-pg15-linux-amd64.tar.gz
56dfef12fe80defccf7fb734db4a58926b191136d29c9a97cbc91d147892b0ed  pg_redis_core-0.5.0-pg15-linux-arm64.tar.gz
7a22435c6ccc29ed58821a71e7607b94fb5e60d516b559d7feb2ad1eb2086fe5  pg_redis_core-0.5.0-pg16-linux-amd64.tar.gz
e40888930efa3f0514cab6e8b57cd49343ad433641e569cefa2c24fb54055d27  pg_redis_core-0.5.0-pg16-linux-arm64.tar.gz

Docker Images (Multi-Arch: linux/amd64, linux/arm64)

# PostgreSQL 15
docker pull ghcr.io/megacoderkim/pg2redis:v0.5.0-pg15

# PostgreSQL 16
docker pull ghcr.io/megacoderkim/pg2redis:v0.5.0-pg16

Documentation

https://megacoderkim.github.io/pg2redis/

pg_redis_core v0.4.1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 13:44

Fixed

  • CI / Pub/Sub Test Reliability: Awaited ioredis ready state on all Pub/Sub subscriber clients in tests/clients/pubsub/test_pubsub.mjs before calling subscribe() / psubscribe(), eliminating an intermittent ioredis@5.11.1 readyCheck (INFO) vs. RESP2 subscribed-mode race.
  • Upgrade Script: Added sql/pg_redis_core--0.4.0--0.4.1.sql.

Prebuilt Extension Binaries (SHA-256)

476c4376820ef100c61242b2c76c564f2c5f7c3997bd33672e79a9a507687169  pg_redis_core-0.4.1-pg15-linux-arm64.tar.gz
4f628cf1f7360fdb9e55ab88a7733b131a00f2fa3161eb41dd3fe4fab29c79b7  pg_redis_core-0.4.1-pg15-linux-amd64.tar.gz
c1bd68b3b67c456c0dacaeb5a0fc56d25274ca17512e7a5c8009a0b3fd56d068  pg_redis_core-0.4.1-pg16-linux-amd64.tar.gz
da52f6b3b03bb811a83fb5d801fa6869cddfd5068b0c6c2d7a7e3161d3c75561  pg_redis_core-0.4.1-pg16-linux-arm64.tar.gz

Docker Images (Multi-Arch: linux/amd64, linux/arm64)

# PostgreSQL 15
docker pull ghcr.io/megacoderkim/pg2redis:v0.4.1-pg15

# PostgreSQL 16
docker pull ghcr.io/megacoderkim/pg2redis:v0.4.1-pg16

Documentation

https://megacoderkim.github.io/pg2redis/

pg_redis_core v0.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 11:27
8aed153

Security & Stability

  • Sandboxed Lua 5.1 VM (src/lua.rs): Restricted mlua to safe standard libraries (table, string, math) and stripped os, io, package, debug, dofile, loadfile, collectgarbage, module, and require. Added configurable instruction-hook execution timeout (pg_redis.lua_time_limit_ms, default 5000 ms) to prevent runaway scripts from stalling the background worker.
  • Real AUTH & HELLO ... AUTH Enforcement (pg_redis.requirepass): Added SUPERUSER_ONLY GUC pg_redis.requirepass with constant-time password verification supporting both AUTH <pass> and AUTH default <pass> as well as HELLO <proto> AUTH default <pass>, returning NOAUTH / WRONGPASS when configured.
  • Connection & Memory Safeguards: Added pg_redis.max_clients (default 1000), pg_redis.max_frame_bytes (default 64 MiB), and bounded per-subscriber Pub/Sub queues (pg_redis.pubsub_queue_size, default 4096) with automatic slow-consumer eviction.

Added

  • Universal Key Expiration (pg_redis_key_expiry): Extended EXPIRE, PEXPIRE, EXPIREAT, PEXPIREAT, TTL, PTTL, PERSIST, and background TTL eviction to work across all 6 data types (Strings, Hashes, Lists, Sorted Sets, Sets, and Streams), added Redis 7 NX / XX / GT / LT flags, and added EXPIRETIME / PEXPIRETIME.
  • Collection Scans & Session Helpers: Added HSCAN (including MATCH, COUNT, NOVALUES), SSCAN, ZSCAN, fixed SCAN ... TYPE <type> filtering, and added GETEX (EX, PX, EXAT, PXAT, PERSIST) for rolling session TTLs (connect-redis) and BullMQ FlowProducer / dependency pagination.
  • Multi-Client Registry (src/clients.rs): Upgraded CLIENT LIST (with TYPE / ID filters), CLIENT INFO, CLIENT KILL (ID / ADDR), and INFO # Clients (connected_clients, maxclients) across all active TCP connections so BullMQ queue.getWorkers() and queue.getQueueEvents() report live workers.
  • Pattern Pub/Sub (src/pubsub.rs): Added PSUBSCRIBE, PUNSUBSCRIBE, pmessage push delivery, and live PUBSUB NUMPAT counts over the in-process PubSubHub.
  • Upgrade Script: Added sql/pg_redis_core--0.3.0--0.4.0.sql creating pg_redis_key_expiry.

Prebuilt Extension Binaries (SHA-256)

14620397ced8b1a3e7a6dd3d4289378eb8ff1497bfcdcd2f30a2d09670b3d3fa  pg_redis_core-0.4.0-pg15-linux-amd64.tar.gz
42d2dd039181be5a295f58e381bc1fab57a8fa02b4ab3e88596b80d423f8d270  pg_redis_core-0.4.0-pg16-linux-arm64.tar.gz
854cde95b2784abf9913119b9eed9338411c28eea96091adf72ac049575ca3da  pg_redis_core-0.4.0-pg15-linux-arm64.tar.gz
abf3189cb2049aec38309c8016e7d4ce14a7244f8ab814fa0b030b57c08cb78e  pg_redis_core-0.4.0-pg16-linux-amd64.tar.gz

Docker Images (Multi-Arch: linux/amd64, linux/arm64)

# PostgreSQL 15
docker pull ghcr.io/megacoderkim/pg2redis:v0.4.0-pg15

# PostgreSQL 16
docker pull ghcr.io/megacoderkim/pg2redis:v0.4.0-pg16

Documentation

https://megacoderkim.github.io/pg2redis/

pg_redis_core v0.3.0

Choose a tag to compare

@github-actions github-actions released this 22 Nov 14:41
43e7a39

Added

  • Redis Pub/Sub (src/pubsub.rs) for Medusa 2.22.7 workflow notifications (ioredis 5.11.1):
    • Named-channel PUBLISH, SUBSCRIBE, UNSUBSCRIBE, PUBSUB CHANNELS [pattern], PUBSUB NUMSUB [ch ...], PUBSUB NUMPAT, and RESET.
    • Exact Redis wire acknowledgements (["subscribe", ch, count], ["unsubscribe", ch, remaining], ["unsubscribe", null, 0], ["message", ch, payload]), RESP3 Push frames (>N), idempotent duplicate subscriptions, multi-channel subscriptions, single-channel and zero-arg unsubscribe-all, and exact PUBLISH live recipient counts.
    • Strict RESP2 subscribed-mode enforcement (allowing SUBSCRIBE, UNSUBSCRIBE, PING returning ["pong", msg], QUIT, and RESET) while permitting concurrent commands in RESP3.
    • Zero-copy in-process PubSubHub over per-connection Tokio mpsc::unbounded_channel on the single-threaded background worker LocalSet: zero PostgreSQL SPI overhead, arbitrary binary-safe payloads exceeding PostgreSQL's 8 KB NOTIFY limit (verified at 32 KB+), strict FIFO ordering, idle subscribers never block other clients or BullMQ workers, and RAII PubSubClientGuard cleanup on disconnect.
    • Support for redis.call('PUBLISH', ...) inside Lua 5.1 scripts and PUBLISH inside MULTI/EXEC transactions.
  • PostgreSQL 16 Build & Release Matrix:
    • Parameterized docker/Dockerfile with ARG PG_MAJOR=15 supporting both PostgreSQL 15 and PostgreSQL 16 (cargo pgrx package --features pg15|pg16).
    • Expanded .github/workflows/release.yml to build, smoke-test, and publish prebuilt extension binaries and multi-arch GHCR images for pg15-linux-amd64, pg15-linux-arm64, pg16-linux-amd64, and pg16-linux-arm64.
    • Added PostgreSQL extension upgrade script sql/pg_redis_core--0.2.0--0.3.0.sql.
  • End-to-End Test Suites:
    • Added tests/clients/pubsub/ pinning ioredis@5.11.1 and bullmq@5.13.0 covering all Pub/Sub edge cases, idle concurrency, disconnect/reconnect/resubscribe, 100-message FIFO ordering, binary safety, and 32 KB+ payloads.
    • Added tests/test_solar_nest_isolation.sh verifying pg_redis.database=solar_nest_redis isolation from application database solar_nest alongside Pub/Sub + BullMQ 5.13.0 on both PostgreSQL 15 and PostgreSQL 16.

Prebuilt Extension Binaries (SHA-256)

170438ca82242e234bb4ca7d2cc0b5bb29abfa27950b434cf3979bfc89967b67  pg_redis_core-0.3.0-pg15-linux-amd64.tar.gz
593afc86983eb325d40dd7bd9893087a4de06e5811a7d914db52ec93a5c8d9d4  pg_redis_core-0.3.0-pg15-linux-arm64.tar.gz
6f851a75a7e5769fe75db1a441653be9ecd279bc3458cc233fb34c7b2a6290be  pg_redis_core-0.3.0-pg16-linux-arm64.tar.gz
d1b54174fe359c726cbbae063a7db2fcf69cfe9b77068aaffde6e196071efa55  pg_redis_core-0.3.0-pg16-linux-amd64.tar.gz

Docker Images (Multi-Arch: linux/amd64, linux/arm64)

# PostgreSQL 15
docker pull ghcr.io/megacoderkim/pg2redis:v0.3.0-pg15

# PostgreSQL 16
docker pull ghcr.io/megacoderkim/pg2redis:v0.3.0-pg16

Documentation

https://megacoderkim.github.io/pg2redis/

pg_redis_core v0.2.0

Choose a tag to compare

@MegacoderKim MegacoderKim released this 22 Nov 10:08

Added

  • Embedded Lua 5.1 Scripting (mlua vendored Lua 5.1):
    • EVAL, EVALSHA, EVAL_RO, EVALSHA_RO, SCRIPT LOAD, SCRIPT EXISTS, SCRIPT FLUSH with SHA1-cached compiled Lua functions and exact NOSCRIPT errors for ioredis.
    • Full Redis Lua sandbox globals: binary-safe KEYS/ARGV, redis.call, redis.pcall, redis.status_reply, redis.error_reply, redis.sha1hex, redis.log, cjson, cmsgpack (rmpv), and bit.
    • Exact Redis Lua ↔ RESP conversions executing atomically inside the active PostgreSQL SPI transaction.
  • Redis Streams (pg_redis_streams):
    • XADD (monotonic *, <ms>-*, <ms>-<seq>, NOMKSTREAM, MAXLEN [~|=], MINID), XTRIM, XLEN, XRANGE, XREVRANGE, XDEL, and XREAD [COUNT] [BLOCK] STREAMS (including $ cursors).
  • Cooperative Blocking Operations (KeyNotifier):
    • Async non-polling BZPOPMIN, BZPOPMAX, BLPOP, BRPOP, and XREAD BLOCK woken immediately after PostgreSQL transaction commits.
  • Redis Sets (pg_redis_sets):
    • SADD, SREM, SMEMBERS, SISMEMBER, SCARD, SPOP.
  • BullMQ 5.13.0 / Medusa Command Parity:
    • Added ZPOPMIN, ZPOPMAX, ZREMRANGEBYRANK, ZREMRANGEBYSCORE, LTRIM, LPOS, RPOPLPUSH, LMOVE, RENAME, and maxmemory_policy:noeviction in INFO and CONFIG GET.
    • Added PostgreSQL extension upgrade script sql/pg_redis_core--0.1.0--0.2.0.sql.
    • Added end-to-end Dockerized bullmq@5.13.0 integration suite (tests/clients/bullmq).

Docker Image (Multi-Arch: linux/amd64, linux/arm64)

docker pull ghcr.io/megacoderkim/pg2redis:v0.2.0

Documentation

https://megacoderkim.github.io/pg2redis/