POSTGRES-PERMISSIONS.md: two databases -> three (skills, memory, ops). postgres-memory/layout.md: remove stale 'SQLite remains' statement. SKILLS-ARTIFACT-V1-PLAN.md: clean up SQLite references. REFACTOR-PLAN.md: SQLite + PostgreSQL -> PostgreSQL only. README_zh.md: replace NanoClaw-era architecture diagram and FAQ with Clawdie's FreeBSD/jail/PostgreSQL architecture. install.html: add operational state to split-brain description. CONTROLPLANE-AIDER-PI.md: update next steps. AGENTS.md: replace negative Paperclip instruction with positive controlplane description. --- Build: pass | Tests: not run (Linux)
1.7 KiB
1.7 KiB
Layout and Snapshots
Jail
- jail name:
db - hostname:
db.<agent>.home.arpa - IP:
${AGENT_SUBNET_BASE}.3 - role: persistent database service
- provisioning:
thick
ZFS expectations
PostgreSQL on ZFS has two different tuning layers:
- pool/vdev sector alignment
- dataset-level properties
Pool/vdev alignment
ashift belongs to the pool/vdev layer, not the dataset.
Important:
- it should match the real sector size of the underlying device
- for modern 4 KiB devices, that usually means
ashift=12 - it cannot be changed later on an existing pool/vdev
Validate the real pool before assuming PostgreSQL storage is correct.
Dataset-level tuning
Conservative starting properties for PostgreSQL data:
compression=lz4atime=offrecordsize=16K
Why recordsize=16K:
- OpenZFS explicitly calls out
recordsizefor database workloads - PostgreSQL uses 8 KiB pages by default
16Kis a conservative starting point that stays near PostgreSQL access patterns and avoids the default128Krecord size
Treat 16K as an initial operational default. Revisit it with benchmarks later.
The jail dataset should be snapshotted at these points:
- after clean jail creation
- after PostgreSQL 17 is installed and starts
- before schema migration
- before schema import
Suggested snapshot names
@fresh@postgres17-ready@pre-schema@post-extensions
Design note
All operational data lives in PostgreSQL (ops database). The memory database holds user/agent memories and the skills database holds preloaded knowledge.
This PostgreSQL jail is the live split-brain backend for Agent System Skills, User/Agent Memory, and Operational State across three databases.