Operations
Day-2 concerns for a managed database: auto-flush, mirror health, optional cron, and drop/cleanup behavior.
Built-in auto-flush
The same database worker that applies WAL also evaluates auto_flush tables on
each koldstore.flush_check_interval_seconds tick (default 30):
- Apply available WAL
- Evaluate tables with
auto_flush = true - Run at most one needed
flush_table
Failed auto-flush skips that table for about 60 seconds. Opt out per table:
Or pass auto_flush => false to manage_table. Manual flush still works.
Prefer ALTER DATABASE / ALTER SYSTEM for worker-facing GUCs — session SET
does not always reach the background worker.
pg_cron fallback
Useful when you want wall-clock schedules or auto_flush = false:
A policy flush with nothing eligible returns safely (rows_flushed = 0).
Mirror health
Alert on:
healthy/ retention flags inasync_mirror_status()- Retained WAL bytes vs
koldstore.async_mirror_max_retained_bytes(default 1 GiB) - Stale
updated_at/ apply rates
Crossing the retained-bytes threshold marks retention unhealthy but never
stops the applier from draining WAL. Separately configure PostgreSQL disk
guards and max_slot_wal_keep_size (an invalidated slot may require rebuild).
Strong application fence:
Disable capture infrastructure
Only after every managed table is unmanaged:
Idempotent. A later manage_table recreates compatible infrastructure.
DROP TABLE
Dropping a managed table cancels jobs, waits for locks, deactivates catalogs,
deletes cold objects under the table prefix (when deletion is enabled for that
path), drops __cl, and records a drop_table_cleanup job.
Backup (honest beta)
- Back up PostgreSQL and cold object prefixes together
- Cold storage is not WAL-protected
recover_segments(..., dry_run => true|false)exists for orphan discovery- Packaged
backup_manifest/validate_cold_storageare not shipped yet pg_dump/COPY TOsee the logical merged view; physical Parquet is outside plain dumps
See Status & Limits.
Suggested monitoring checklist
SHOW shared_preload_librariesstill includeskoldstorekoldstore.preload_status()→loaded_via_shared_preload = trueasync_mirror_status()healthy; retained bytes under thresholddescribe_tablefor hot/cold growth andlast_error- Flush job backlog (
list_jobspending/running) - Disk for PostgreSQL data directory and cold backend