Quick start
This guide sets up pgredis 0.1.0 (extension schema 0.54, ABI 3, candidate v0.1.0-rc1) against a local PostgreSQL 18 instance and runs PING, SET and GET through redis-cli and SQL. Check Compatibility first to confirm that your workload only uses supported commands.
v0.1.0-rc1 (2026-11-08, commit 11411411d72ab45456904cc602cefbb13b68ff25) is an unpublished release candidate. No public download is available yet; install from a locally built development archive or build directly from source.
Prerequisites
- Debian 13 (
amd64orarm64) for development archives, or a Linux / macOS build host for source builds. - PostgreSQL 18 (tested on 18.6) with
pg_config(postgresql-server-dev-18on Debian). - Superuser access to a dedicated PostgreSQL instance that you can configure and restart (
pg_redisrequiressuperuser = trueandshared_preload_libraries). - Python 3 (when running
install.pyfrom a development archive) andredis-cli.
1. Install the gateway and extension
If you have a v0.1.0-rc1 development archive (pgredis-0.1.0-pg18.6-debian13-amd64.tar.gz or pgredis-0.1.0-pg18.6-debian13-arm64.tar.gz), verify its SHA-256 hash before extracting (d72fdcb4f40d429e5b650d0671105c923db7ceb4425b50f68d45eea0d61e2ba8 for amd64; 4dcc546ef4c0562eb0b69500c0bbb43f664c3b955259ccde92900ef52e269cd7 for arm64):
If you are installing from a source checkout instead of a development archive, build the Go gateway and C extension with make build and install the extension with make -C extension PG_CONFIG=/usr/lib/postgresql/18/bin/pg_config install.
pgredis -version must print pgredis 0.1.0.
2. Configure PostgreSQL
Add the following settings to postgresql.conf. If shared_preload_libraries already lists other modules, append pg_redis to the comma-separated list:
Add SCRAM authentication for the application role to pg_hba.conf before broader rules:
Restart PostgreSQL so shared_preload_libraries and max_prepared_transactions take effect.
3. Create the database, extension and role
Connect to PostgreSQL as a superuser and create the database, extension and application role:
Verify the installed extension schema version and ABI:
The grants above allow ordinary data commands, transactions, blocking commands and Pub/Sub, but do not grant Redis administration commands such as FLUSHALL, INFO, CONFIG or MONITOR.
4. Start the gateway and run commands
Start the gateway on port 6379 (the Mimus planned Redis port) against PostgreSQL on port 5432:
If you omit -listen and -pg, the pgredis binary defaults to 127.0.0.1:56379 and postgres://127.0.0.1:55432/pgredis. Pass explicit flags so the port and database match your instance.
In a second terminal, run PING, SET and GET with redis-cli:
Enter the pgredis_app password when prompted. The commands return PONG, OK and hello. Because the key is stored in pgredis_demo, SQL queries on the same database see it immediately:
Deployment notes
- Non-loopback listeners require TLS. When
-listenbinds to a non-loopback address, you must pass-tls-certand-tls-keyor the gateway refuses to start. - One gateway per database. Run one
pgredisgateway process per PostgreSQL database; multiple gateways sharing one database are not verified. - Write serialization. Write commands other than plain
GETandSETtake a per-database exclusive lock until commit; see Per-database serialization. - Schema upgrades. When upgrading from extension schema
0.52or0.53, replace the binaries and runALTER EXTENSION pg_redis UPDATE TO '0.54';in each database.
