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

[YSQL] Fix migrations to properly update pg_proc #15959

Closed
jasonyb opened this issue Feb 2, 2023 · 1 comment
Closed

[YSQL] Fix migrations to properly update pg_proc #15959

jasonyb opened this issue Feb 2, 2023 · 1 comment
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@jasonyb
Copy link
Contributor

jasonyb commented Feb 2, 2023

Jira Link: DB-5369

Description

Commit 00e8862 changes UPDATE to DELETE and INSERT as a workaround to issue #13500. It doesn't properly translate the UPDATE to DELETE and INSERT because the conditions of the UPDATE don't match the condition of the DELETE. Actually, in the first place, it didn't have enough conditions.

\d pg_proc shows

Indexes:
    "pg_proc_oid_index" PRIMARY KEY, lsm (oid ASC)
    "pg_proc_proname_args_nsp_index" UNIQUE, lsm (proname ASC, proargtypes ASC, pronamespace ASC)

If using the unique index, it should condition on all three columns. Before, it had only two columns, and after, it had only one column. One possibility right now is to have user's public.pg_stat_get_progress_info get deleted.

@jasonyb jasonyb added kind/bug This issue is a bug area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Feb 2, 2023
@yugabyte-ci yugabyte-ci added the priority/medium Medium priority issue label Feb 2, 2023
@jasonyb
Copy link
Contributor Author

jasonyb commented Feb 2, 2023

V17 and V22 also have the issue.

@jasonyb jasonyb changed the title [YSQL] Fix V31 migration to not affect other pg_stat_get_progress_info [YSQL] Fix migrations to properly update pg_proc Feb 2, 2023
fizaaluthra added a commit that referenced this issue Feb 3, 2023
Summary:
The condition of the pg_proc `UPDATE`/`DELETE` in migrations V17, V22, V31 is not specific enough - use all 3 columns of `pg_proc_proname_args_nsp_index` in the condition.

Test Plan: Jenkins: test regex: .*TestYsqlUpgrade.*

Reviewers: jason

Reviewed By: jason

Differential Revision: https://phabricator.dev.yugabyte.com/D22719
@yugabyte-ci yugabyte-ci removed the status/awaiting-triage Issue awaiting triage label Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/bug This issue is a bug priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

3 participants