Skip to content

gnomon_c

Optional C triggers, routing hooks and heartbeat worker for Gnomon.

gnomon · Optional C triggers, routing hooks and heartbeat worker for Gnomon.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102370gnomon_cgnomon1.0.2TIMEPostgreSQLC

PostgreSQL · 15, 16, 17, 18

Relationships
Requiresgnomon

Usage

Sources:

gnomon_c 1.0.2 is Gnomon’s optional C companion for PostgreSQL 15–18. It depends on gnomon. The C versioning trigger can be used without preload, but routing hooks, shared-memory optimizations and the heartbeat worker require preload and a restart.

Enablement

shared_preload_libraries = 'gnomon_c'
gnomon.heartbeat_databases = 'app'
gnomon.heartbeat_interval = '1s'
CREATE EXTENSION gnomon;
CREATE EXTENSION gnomon_c;
SELECT gnomon.use_c_trigger('public.orders'::regclass, true);

The table must already be tracked and the caller must hold its management rights. The C trigger supports known-time, row-mode tables without wide keys; unsupported combinations are rejected. Configure the actual database name and preserve other preload entries. Creation and shared configuration require administrator control.

Operations

With preloading, hooks route branch reads/writes and provide additional locking, point-read and upsert behavior. Keep the Gnomon security model: never grant internal reader/search roles to applications. Upgrade the SQL core first, then gnomon_c with matching files and restart processes that loaded replaced libraries. The companion does not make unlogged scratch history durable or remove retention and heartbeat requirements.

1.0.2 correction

The SQL upgrade repairs read sets recorded by 1.0.1 when a branch predates table tracking. Merges now restore the session’s selected branch. The C companion rejects system-column reads on branches instead of crashing. Update the SQL core to 1.0.2 first, then the matching C companion if installed; restart processes using a replaced preloaded library.

Table reader