Skip to content
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

upgrades: use GetSystemDatabaseSchemaVersion instead of querying pg_attribute #111894

Closed
healthy-pod opened this issue Oct 6, 2023 · 2 comments
Closed
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)

Comments

@healthy-pod
Copy link
Contributor

healthy-pod commented Oct 6, 2023

addRootUser queries pg_attribute to determine whether the role_id and member_id columns are present because it can't rely on version gates against active cluster version (#106764).

After #111404, we can get the actual schema version of the system database. We should depend on this version in checking whether the columns above are present or not.

Since some tests bootstrap with versions less than current master (or 23.2 in the future), we have to wait until minimum supported binary version aka minimum version at which tests can bootstrap is 23.2 before making this change.

Jira issue: CRDB-32120

@healthy-pod healthy-pod added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) labels Oct 6, 2023
@rafiss
Copy link
Collaborator

rafiss commented Oct 10, 2023

Since these columns are added during the v23.1 upgrade finalization, I think we can just safely remove these gates once the min binary version is bumped to 23.2.

@rafiss
Copy link
Collaborator

rafiss commented Nov 7, 2023

I'm going to close this, since we are soon going to remove code relating to the 22.2/23.1 mixed version state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants