Skip to content

Classify missing table on PG #2906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 12, 2025
Merged

Conversation

Amogh-Bharadwaj
Copy link
Contributor

If a Postgres table is dropped, then we get a no rows in result set error when a schema change (RelationMessage) is encountered.
This PR catches this specific error case and classifies it

Copy link
Member

@serprex serprex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamKunalGupta do unknown classifications get passed through as an error to slack without sending out notifications?

@@ -110,6 +108,9 @@ func (c *PostgresConnector) getRelIDForTable(ctx context.Context, schemaTable *u
ON n.oid = c.relnamespace WHERE n.nspname=$1 AND c.relname=$2`,
schemaTable.Schema, schemaTable.Table).Scan(&relID)
if err != nil {
if errors.Is(err, pgx.ErrNoRows) {
return 0, shared.ErrTableDoesNotExist
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to include table name in the error information?
Also maybe we should wrap the original error as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

original error is already known to be pgx.ErrNoRows, not sure if I'm following

@iamKunalGupta
Copy link
Member

@iamKunalGupta do unknown classifications get passed through as an error to slack without sending out notifications?

Yes, anything unknown is auto sent to us, without sending out to customer

@heavycrystal heavycrystal merged commit ddf5f37 into main May 12, 2025
9 checks passed
@heavycrystal heavycrystal deleted the classify-missing-source-table branch May 12, 2025 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants