pg_kv
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_kv | 0.1.0 | FEAT | PostgreSQL | Rust |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 2895 | pg_kv | No | Yes | Yes | Yes | No | No | kv |
Early release, not production ready. Preload/restart and superuser installation required. Cluster-wide keyspace: nontransactional, not durable or replicated. Grant kv schema usage deliberately; prefixing keys is not tenant access control. Capacity eviction can reset rate-limit allowance.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.1.0 | 1817161514 | pg_kv | - |
| RPM | PIGSTY | 0.1.0 | 1817161514 | pg_kv_$v | - |
| DEB | PIGSTY | 0.1.0 | 1817161514 | postgresql-$v-pg-kv | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.1.0 el8.x86_64.pg18 : pg_kv_18 pg_kv_18-0.1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 0.1.0 el8.x86_64.pg17 : pg_kv_17 pg_kv_17-0.1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 0.1.0 el8.x86_64.pg16 : pg_kv_16 pg_kv_16-0.1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 0.1.0 el8.x86_64.pg15 : pg_kv_15 pg_kv_15-0.1.0-1PGSTY.el8.x86_64.rpm
| N/A |
| el8.aarch64 | PIGSTY 0.1.0 el8.aarch64.pg18 : pg_kv_18 pg_kv_18-0.1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 0.1.0 el8.aarch64.pg17 : pg_kv_17 pg_kv_17-0.1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 0.1.0 el8.aarch64.pg16 : pg_kv_16 pg_kv_16-0.1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 0.1.0 el8.aarch64.pg15 : pg_kv_15 pg_kv_15-0.1.0-1PGSTY.el8.aarch64.rpm
| N/A |
| el9.x86_64 | PIGSTY 0.1.0 el9.x86_64.pg18 : pg_kv_18 pg_kv_18-0.1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 0.1.0 el9.x86_64.pg17 : pg_kv_17 pg_kv_17-0.1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 0.1.0 el9.x86_64.pg16 : pg_kv_16 pg_kv_16-0.1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 0.1.0 el9.x86_64.pg15 : pg_kv_15 pg_kv_15-0.1.0-1PGSTY.el9.x86_64.rpm
| N/A |
| el9.aarch64 | PIGSTY 0.1.0 el9.aarch64.pg18 : pg_kv_18 pg_kv_18-0.1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 0.1.0 el9.aarch64.pg17 : pg_kv_17 pg_kv_17-0.1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 0.1.0 el9.aarch64.pg16 : pg_kv_16 pg_kv_16-0.1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 0.1.0 el9.aarch64.pg15 : pg_kv_15 pg_kv_15-0.1.0-1PGSTY.el9.aarch64.rpm
| N/A |
| el10.x86_64 | PIGSTY 0.1.0 el10.x86_64.pg18 : pg_kv_18 pg_kv_18-0.1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 0.1.0 el10.x86_64.pg17 : pg_kv_17 pg_kv_17-0.1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 0.1.0 el10.x86_64.pg16 : pg_kv_16 pg_kv_16-0.1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 0.1.0 el10.x86_64.pg15 : pg_kv_15 pg_kv_15-0.1.0-1PGSTY.el10.x86_64.rpm
| N/A |
| el10.aarch64 | PIGSTY 0.1.0 el10.aarch64.pg18 : pg_kv_18 pg_kv_18-0.1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 0.1.0 el10.aarch64.pg17 : pg_kv_17 pg_kv_17-0.1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 0.1.0 el10.aarch64.pg16 : pg_kv_16 pg_kv_16-0.1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 0.1.0 el10.aarch64.pg15 : pg_kv_15 pg_kv_15-0.1.0-1PGSTY.el10.aarch64.rpm
| N/A |
| d12.x86_64 | PIGSTY 0.1.0 d12.x86_64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 0.1.0 d12.x86_64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 0.1.0 d12.x86_64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 0.1.0 d12.x86_64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~bookworm_amd64.deb
| N/A |
| d12.aarch64 | PIGSTY 0.1.0 d12.aarch64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 0.1.0 d12.aarch64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 0.1.0 d12.aarch64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 0.1.0 d12.aarch64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~bookworm_arm64.deb
| N/A |
| d13.x86_64 | PIGSTY 0.1.0 d13.x86_64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 0.1.0 d13.x86_64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 0.1.0 d13.x86_64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 0.1.0 d13.x86_64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~trixie_amd64.deb
| N/A |
| d13.aarch64 | PIGSTY 0.1.0 d13.aarch64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 0.1.0 d13.aarch64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 0.1.0 d13.aarch64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 0.1.0 d13.aarch64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~trixie_arm64.deb
| N/A |
| u22.x86_64 | PIGSTY 0.1.0 u22.x86_64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 0.1.0 u22.x86_64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 0.1.0 u22.x86_64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 0.1.0 u22.x86_64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~jammy_amd64.deb
| N/A |
| u22.aarch64 | PIGSTY 0.1.0 u22.aarch64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 0.1.0 u22.aarch64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 0.1.0 u22.aarch64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 0.1.0 u22.aarch64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~jammy_arm64.deb
| N/A |
| u24.x86_64 | PIGSTY 0.1.0 u24.x86_64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~noble_amd64.deb
| PIGSTY 0.1.0 u24.x86_64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~noble_amd64.deb
| PIGSTY 0.1.0 u24.x86_64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~noble_amd64.deb
| PIGSTY 0.1.0 u24.x86_64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~noble_amd64.deb
| N/A |
| u24.aarch64 | PIGSTY 0.1.0 u24.aarch64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~noble_arm64.deb
| PIGSTY 0.1.0 u24.aarch64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~noble_arm64.deb
| PIGSTY 0.1.0 u24.aarch64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~noble_arm64.deb
| PIGSTY 0.1.0 u24.aarch64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~noble_arm64.deb
| N/A |
| u26.x86_64 | PIGSTY 0.1.0 u26.x86_64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 0.1.0 u26.x86_64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 0.1.0 u26.x86_64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 0.1.0 u26.x86_64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~resolute_amd64.deb
| N/A |
| u26.aarch64 | PIGSTY 0.1.0 u26.aarch64.pg18 : postgresql-18-pg-kv postgresql-18-pg-kv_0.1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 0.1.0 u26.aarch64.pg17 : postgresql-17-pg-kv postgresql-17-pg-kv_0.1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 0.1.0 u26.aarch64.pg16 : postgresql-16-pg-kv postgresql-16-pg-kv_0.1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 0.1.0 u26.aarch64.pg15 : postgresql-15-pg-kv postgresql-15-pg-kv_0.1.0-1PGSTY~resolute_arm64.deb
| N/A |
Build
You can build the RPM / DEB packages for pg_kv using pig build:
Install
You can install pg_kv directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
Sources:
pg_kv 0.1.0 provides a shared-memory cache, counters, token-bucket rate limiting and sorted sets. This early release targets PostgreSQL 15–18 and is not production ready.
Core Workflow
Add the library to the existing preload list and restart PostgreSQL before installing the extension as a superuser:
Installation fails if the library was not preloaded. Grant schema kv usage only to intended callers. The keyspace is shared across every database in the cluster; prefixes organize keys but do not enforce tenant isolation.
Operations and Capacity
kv.ttl returns milliseconds, -1 for a permanent key and -2 for a missing key. kv.expire changes expiry, kv.del removes a key, and kv.rate_limit_info reports allowance and retry timing. Sorted sets also support kv.zscore, kv.zrank, kv.zrevrank, kv.zincrby, kv.zcard and kv.zrem.
Restart settings include pg_kv.max_entries, pg_kv.max_key_bytes, pg_kv.max_value_bytes, pg_kv.shards, pg_kv.sweep_interval_ms, pg_kv.max_zset_members and pg_kv.max_member_bytes. Storage is bounded; oversize values fail, and pressure can evict cached keys. kv.flush is an administrative operation unavailable to the public role by default.
Durability Boundary
Cache changes survive transaction rollback but disappear on a server restart or crash. They are not WAL logged or replicated; a standby has its own cache. Use this for disposable state, not authoritative records or a globally coordinated limiter across independent servers.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)