fix(postgres): explain a dropped table instead of raw driver text - #91366
fix(postgres): explain a dropped table instead of raw driver text#91366Gilbert09 wants to merge 1 commit into
Conversation
When a table or column a sync reads is dropped or renamed on the source, the streaming query fails with "relation ... does not exist" (or the column variant). That was already non-retryable, but the stored latest_error was the raw psycopg text, which echoes the relation name and a SQL fragment back and gives no next step. Give the bucket an actionable message. Supabase's realtime-partition message still wins for those partitions through first-match selection. Generated-By: PostHog Desktop Task-Id: c515c2ae-d0fd-42c5-81fc-44b3650ff0ae
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Hey @Gilbert09! 👋 It looks like your git author email on this PR isn't your
You can fix it for this repo with: git config user.email "you@posthog.com"Or set it globally with |
🤖 CI report
|
Problem
When a table or column a Postgres sync reads is dropped or renamed on the source, the sync stopped, which is correct, but stored the raw psycopg error as
latest_error:relation "..." does not existfollowed by a SQL fragment. The customer got no next step, and the message echoed their own relation name and query back into the error panel.Changes
does not existnon-retryable bucket an actionable message. It wasNone, which fell back to the raw text.How did you test this code?
Ran
TestPostgresSourceNonRetryableErrorsand the Supabase source tests. Addedtest_missing_relation_surfaces_actionable_message, which catches a revert of the bucket back toNoneor raw text. Reworked the Supabase parametrized test to assert realtime partitions keep their specific message while other dropped relations get the generic one. Did not run the full warehouse suite, because this sandbox has no dev stack.Automatic notifications
Docs update
None.
🤖 Agent context
Autonomy: Fully autonomous
Found while triaging a batch of production warehouse sync failure classes. Skills invoked: /writing-user-facing-copy, /writing-tests, /writing-code-comments, /writing-pr-descriptions.
The
does not existkey is deliberately broad; it already caught both relation and column drops, and the new message covers both. Supabase inherits this bucket and keeps its realtime-partition message ahead of it. Relation names in the tests are invented.Created with PostHog Desktop