AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Self-Hosted Analytics Replication Slot Causes Unlimited Pg_wal Growth

Idle self-hosted Supabase with WAL archiving enabled accumulates pg_wal files indefinitely because the analytics logical replication slot fails to advance; fixing requires capping slot retention or dropping the slot if unused.

highConfidence 70%Docker-ComposeStoragePostgreSQL

Origin Analysis

The analytics service creates a logical replication slot but does not acknowledge LSN progression when idle, causing PostgreSQL to retain WAL segments indefinitely. With WAL archiving enabled, the effect is exacerbated because archived WALs continue to be stored and the slot keeps all segments until consumed. The underlying defect is a stalled consumer and absence of a max_slot_wal_keep_size limit.
1. Deploy Supabase self-hosted with WAL-G archiving enabled. 2. Enable the analytics service. 3. Leave the instance idle (no application traffic). 4. Observe the pg_wal directory growing without bound, far exceeding min_wal_size.

Fixing Code Block

Edge Case Audit

Dropping the replication slot causes analytics to lose all unreplicated changes and requires reinitialization. Setting max_slot_wal_keep_size may invalidate the slot when the limit is exceeded, similarly breaking analytics. Test in staging and ensure backups/archiving align; rollback by removing the max_slot_wal_keep_size setting and recreating the slot if needed.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state