Skip to Content
Installation

Installation

KoldStore must load at postmaster start. Without shared_preload_libraries = 'koldstore', planner hooks never register and managed SELECTs can silently miss cold rows after flush.

Fastest path: Docker

Published images preload the extension and create it on first init:

BASH
docker pull jamals86/pg-koldstore:latestdocker run --rm \  -e POSTGRES_PASSWORD=postgres \  -p 5432:5432 \  jamals86/pg-koldstore:latest

Connect:

BASH
psql postgres://postgres:postgres@127.0.0.1:5432/koldstoredb
DetailValue
Default databasekoldstoredb
PostgreSQL major16
Tagslatest, <version>-pg16 (for example 0.1.5-beta.0-pg16)
Architecturesamd64, arm64

Confirm:

SQL
SHOW shared_preload_libraries;     -- must include koldstoreCREATE EXTENSION IF NOT EXISTS koldstore;SELECT koldstore.preload_status(); -- loaded_via_shared_preload = true

pg_cron may be packaged in the image but is not preloaded. Enable it yourself if you want cron-based flush scheduling.

Shared preload (required on every install)

Install order:

  1. Install extension package files
  2. Set shared_preload_libraries = 'koldstore' (merge with any existing list)
  3. Restart PostgreSQL (reload is not enough)
  4. CREATE EXTENSION koldstore

Ubuntu / Debian example:

BASH
echo "shared_preload_libraries = 'koldstore'" | \  sudo tee /etc/postgresql/16/main/conf.d/koldstore.confsudo systemctl restart postgresql@16-main

Rules:

  • session_preload_libraries is not sufficient
  • Removing preload after manage_table is unsupported
  • Check with SELECT koldstore.preload_status();

Logical WAL (required for managed tables)

Committed-WAL capture needs:

CONF
wal_level = logical

Restart after changing wal_level. Do not create the publication or logical slot yourself: CREATE EXTENSION ensures the empty publication koldstore_async_mirror, and the first manage_table creates the database’s deterministic slot. Provisioning is idempotent.

Prefer ALTER SYSTEM / ALTER DATABASE for settings the background worker reads (session SET does not always reach the worker):

SettingBaseline
shared_preload_librariesinclude koldstore
wal_levellogical
koldstore.async_mirror_max_retained_bytes1073741824 (1 GiB health alert)
koldstore.flush_check_interval_seconds30
koldstore.async_apply_poll_interval_ms100

From source (developers)

Build and install with pgrx against a local PostgreSQL (typical loop for PG 16):

BASH
cargo pgrx install -p pg_koldstore \  --no-default-features \  --features "pg16 s3" \  --pg-config "$(cargo pgrx info pg-config 16)"

Then set preload, restart, and CREATE EXTENSION. See the repository quickstart  and Docker  folder for compose + MinIO layouts.

Upgrades (beta)

There are no packaged ALTER EXTENSION … UPDATE edges yet while the product is in development. Local installs reinstall or resync when the bootstrap SQL changes. Treat in-place upgrade and pg_upgrade as future ops work — see Status & Limits.

Next step

Getting Started — register storage, manage a table, flush, and read with changes_since.

Last updated on