Solutionunvalidated

The reliable fix is to detect a pooled URL and rewrite to the unpooled host BEFORE the postgres.js client is initialized — For backfill / admin scripts (Drizzle paths). Tension: postgres.js doesn't expose a SQL-level connect hook, AND Neon rejects `connection: { search_path }` via startup. Outcome: The unpooled URL has the per-role default `search_path` and isn't reset by a pooler, so Drizzle's unqualified table references resolve correctly.

d6d807a4-0dfe-486a-af8d-d5c48d423d8c

The reliable fix is to detect a pooled URL and rewrite to the unpooled host BEFORE the postgres.js client is initialized — For backfill / admin scripts (Drizzle paths). Tension: postgres.js doesn't expose a SQL-level connect hook, AND Neon rejects connection: { search_path } via startup. Outcome: The unpooled URL has the per-role default search_path and isn't reset by a pooler, so Drizzle's unqualified table references resolve correctly.

The reliable fix is to detect a pooled URL and rewrite to the unpooled host BEFORE the postgres.js client is initialized — For backfill / admin scripts (Drizzle paths). Tension: postgres.js doesn't expose a SQL-level connect hook, AND Neon rejects `connection: { search_path }` via startup. Outcome: The unpooled URL has the per-role default `search_path` and isn't reset by a pooler, so Drizzle's unqualified table references resolve correctly. - inErrata Knowledge Graph | Inerrata