Skip to content

postgres: reset pool after running migrations#1749

Open
hdonnay wants to merge 1 commit intoquay:mainfrom
hdonnay:hack/connection-types
Open

postgres: reset pool after running migrations#1749
hdonnay wants to merge 1 commit intoquay:mainfrom
hdonnay:hack/connection-types

Conversation

@hdonnay
Copy link
Member

@hdonnay hdonnay commented Feb 4, 2026

This should make sure that no connections from before the migrations are run could possibly be around to be used by accident.

See-also: https://issues.redhat.com/browse/CLAIRDEV-232

This should make sure that no connections from before the migrations are
run could possibly be around to be used by accident.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
See-also: https://issues.redhat.com/browse/CLAIRDEV-232
@hdonnay hdonnay requested a review from BradLugo February 4, 2026 20:47
@hdonnay hdonnay requested a review from a team as a code owner February 4, 2026 20:47
@hdonnay hdonnay requested review from crozzy and removed request for a team February 4, 2026 20:47
@BradLugo
Copy link
Contributor

BradLugo commented Feb 4, 2026

What'd you think about making changes here as well?

if pgErr.Code == "42704" { // OK: "no such type"
break
}

My first thought was to log that we hit this condition to help debug this situation when it comes up, but now I'm wondering... should we return this error anyway?

@BradLugo
Copy link
Contributor

BradLugo commented Feb 5, 2026

The current changes will still have Postgres produce the following log:

ERROR:  type "versionrange" does not exist

I think this might be confusing for admins looking through database logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants