Skip to content

ptlive

Shared-memory table access method with WAL and snapshots

ptlive · Shared-memory table access method with WAL and snapshots

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102488ptliveptlive1.0.1FEATAGPL-3.0-onlyC

PostgreSQL · 18

Usage

Sources:

ptlive is a shared-memory table access method with MVCC, PostgreSQL WAL integration and its own snapshots. Source version 1.0.1 targets PostgreSQL 18; adapters for 17 and 19 are present but unqualified. Treat it as a preview requiring workload and recovery validation.

Enable the Runtime

Install matching server files, preserve existing preload entries, configure memory, then restart PostgreSQL. The source default reserves a 6144 MiB budget; size this for the host.

shared_preload_libraries = 'ptlive'
ptlive.memory_mb = 6144

A superuser installs the extension in each database. Wait for readiness before creating tables.

CREATE EXTENSION ptlive;
SELECT ptlive_version(), ptlive_runtime_state(), ptlive_runtime_ready();
CREATE TABLE sample_memory (id bigint PRIMARY KEY, payload text) USING ptlive;
INSERT INTO sample_memory VALUES (1, 'example');
SELECT * FROM sample_memory;

Configuration and Monitoring

ptlive.enabled, ptlive.memory_mb, ptlive.max_relations and ptlive.advisor_enabled are startup settings. The optional advisor is enabled by default. Inspect actual settings and reload/restart contexts through pg_settings.

SELECT name, setting, context FROM pg_settings WHERE name LIKE 'ptlive.%';
SELECT ptlive_storage_allocated_bytes(), ptlive_snapshot_generation();
SELECT ptlive_gc_cycles(), ptlive_gc_reclaimed_versions();
SELECT slot_name, restart_lsn, wal_status
FROM pg_replication_slots WHERE slot_name = 'ptlive_snapshot_retention';

Recovery Boundaries

Durability relies on both snapshots and retained WAL. Monitor memory exhaustion, snapshot progress and WAL retention; do not remove required snapshot or WAL files. Qualify backup, restart, disk-full recovery and failover with the exact binary and topology.

Early Lock Release changes internal lock/flush ordering for eligible transactions and needs crash testing. ptlive.elr_test_fault can deliberately panic the server and belongs only in disposable tests. Presence of ordinary SQL or index support is not proof that every PostgreSQL feature or replication topology is supported. Preserve matching library, SQL and snapshot formats during maintenance.

Table reader