Aura M1: memory PG · Pooler/RLS · BM25/HNSW · TTL/HA

Aura M1 memory/PG stack durable decisions (builds on Aura-M0-Runtime-Nats-Keda-Fission.md).

Pooler + RLS

  • Product = CloudNativePG Pooler, poolMode: transaction; app DSN host = pooler Service only (aura-pg-pooler…) — never PG Pod/-rw/-ro Service IP.
  • Every tenant tx: set_config('app.tenant_id', $1, true) then work; ban false / session SET under transaction pooling.
  • V1.1 smoke: A→COMMIT→B via pooler; cross-tenant hidden; static forbid session GUC. Gates: check-pg-pooler.sh · smoke-pg-pooler.sh.

memory_items / audit / nodes-edges

  • memory_items: parent LIST(memory_type); short_term/episodic RANGE(created_at); long_term/semantic leaf; PK includes partition keys (no lone id FK).
  • memory_audit: RANGE(created_at) · soft-delete 없음(파티션 DROP SoR) · FORCE RLS.
  • memory_nodes/memory_edges: UNIQUE(tenant,type,name); edges FK CASCADE + self-loop CHECK; item_id logical only.
  • Gates: check-memory-items.sh / smoke-memory-items.sh · check-memory-audit.sh · check-memory-nodes-edges.sh.

BM25 · embeddings · HNSW · TTL · HA

  • Lexical = stock tsvector+GIN+ts_rank (content_tsv); ParadeDB pg_search M1 비채택 (Okapi BM25 아님 — 품질 갭 시 재평가).
  • Embeddings: parent halfvec + LIST(model_key); per-partition halfvec(N) HNSW cosine; active pin AURA_EMBEDDING_MODEL=BAAI/bge-m3 · dims=1024 · model_key=BAAI/bge-m3:1.
  • short_term embed INSERT blocked by DDL CHECK; recall GUC: hnsw.iterative_scan=relaxed_order · ef_search=40 · max_scan_tuples=20000 (no app post-filter).
  • Multitenant HNSW fixture: OFF=0 / relaxed_order≥1 on halfvec_l2_ops PK-free table (cosine skew gap logged on pgvector 0.8.7).
  • TTL: short_term 14d · episodic 24mo · audit 12mo; DROP daily UTC task name aura.tasks.memory.ttl (impl M4).
  • HA draft: CNPG instances≥3 + zone spread; Barman PITR dest TBD; RPO≤5m · RTO≤1h; recall opt-in RO pooler.

Store MQT

  • aura.tasks.memory.store → stored/error; consumer aura_memory_store; withTenantTx + pooler DSN; gate check-memory-store.sh.