Skip to content
Conversations · AnyKey Cafe

Postgres cluster setup — Part 3

Conversation provenance

Source: ChatGPT data export · Conversation ID: 68d74325-ed14-8320-96f1-4d2fdd080e38

Created: 2025-09-26T18:52:21-07:00 · Part 3 of 3


Alternate or regenerated message nodes

Preserved outside the final active path; node relationships are retained for provenance.

ChatGPT2025-09-27T01:24:21-07:00 · gpt-5 · node 6df9b88d-0b99-420c-a88e-91eae2ccf0d3 · parent 817bde48-48dc-4d42-8d9a-2423ec811f58

Got it, Darren — here’s a compact block you can copy/paste into your own notes so we can pick right back up next time without retracing everything:

# Little Ougway – Database + Ingestion Setup (Checkpoint)

## PostgreSQL Cluster
- Port: 5432 (default)
- Data dir: /mnt/storage/tokenspacedata
- Service: postgresql@16-main
- User: darren (auth via ~/.pgpass, socket connection)
- Auth: SCRAM-SHA-256, password in ~/.pgpass

## Schemas
- content: documents, chunks, sources
- token: forms, cooc, instances, senses
- cog: conversations, turns, memories, reflections
- lat: activations, cells, config, edges, memberships, neighbors, projections, topology_events, torus
- All with owners = darren

## Extensions Installed
- vector (pgvector 0.6.0, cosine ops)
- pg_trgm
- uuid-ossp
- plpgsql

## Indexes
- HNSW indexes on embedding columns (content.chunks, cog.turns, cog.memories, lat.cells)
- TRGM indexes on text fields (chunks.text, documents.title)
- Btree primary keys and supporting indexes

## Adjustments Made
- Added UNIQUE constraint: content.documents.external_id
- Dropped NOT NULL on embedding columns (content.chunks, cog.turns, cog.memories) so inserts succeed before updates
- .pgpass configured for Unix socket + port 5432

## Ingestion Script (ingest_pile_v2.py)
- Location: ~/Documents/tokenspace/
- DB_DSN: postgresql:///tokenspace?host=/var/run/postgresql
- ROOT_DIR: /mnt/storage/pile_uncopyrighted (15,325 files)
- MODEL_DIR: nomic-ai/nomic-embed-text-v1.5 (resolved offline from /mnt/storage/hf-cache)
- Batch size: 64
- Chunk size: 1500, overlap: 200
- Force re-embed: false
- Log file: ~/Documents/tokenspace/ingest_full.log

## Monitoring
- Logs: tail -f ~/Documents/tokenspace/ingest_full.log
- Counts: SELECT COUNT(*) FROM content.documents/chunks;
- GPU: nvidia-smi (RTX 3060, ~10 GB VRAM usage)
- Disk: df -h /mnt/storage
- WAL: du -sh /mnt/storage/tokenspacedata/pg_wal

## Status
- Ingestion is running, GPU and disk active, rows being written/updated.
- No current errors. Ready for long run.

That’s everything we set up, every tweak, and how it’s running now.

👉 Would you like me to also prep a short “first RAG test script” block here, so when you’ve got some docs ingested you can immediately confirm retrieval without us having to backtrack?