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

PostgREST Schema Cache Not Updating After DDL Changes (PGRST204)

PostgREST fails to invalidate its schema cache after adding new columns or tables to the public schema, causing PGRST204 errors for all new fields despite multiple cache reload attempts.

highConfidence 65%PostgRESTMigrationReplication

Origin Analysis

The PostgREST instance is not receiving or processing the 'reload schema' notification, likely due to a notification delivery failure (e.g., connection pooling interference) or a bug in the PostgREST cache invalidation mechanism in the version used by Supabase.
1. ALTER TABLE planting_plans ADD COLUMN batch_number TEXT; 2. Confirm column exists via information_schema. 3. Attempt to insert via Supabase client. 4. Observe PGRST204 error. Cache refresh methods (NOTIFY, grants, restart) do not resolve.

Fixing Code Block

Edge Case Audit

Calling `pgrst.reload_schema_cache()` may require elevated privileges (superuser or owner) and may not exist in older PostgREST versions. If the function fails, the root cause may be a pooler that drops LISTEN/NOTIFY events; in that case, use the Supabase Dashboard's 'Reload schema cache' button or direct connection. Avoid dropping/recreating columns as a workaround as it can cause data loss.

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