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

feat: only GRANT when ingesting into a new table #212

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

michalc
Copy link
Member

@michalc michalc commented Mar 19, 2024

Copying the SELECT permissions on each batch is semantically fine, but

  • Unnecessary at best
  • And at worst, can cause hanging and "tuple concurrently updated" errors when other clients try to do GRANT SELECT on the tables in question

This change makes it so the copy of SELECT privileges only happens when we ingest the first batch into a new table, and never otherwise.

There is an existing test test_migrate_add_column_not_at_end_permissions_preserved that test permissions are preserved.

@michalc michalc requested a review from a team as a code owner March 19, 2024 17:51
Copying the SELECT permissions on each batch is semantically fine, but

- Unnecessary at best
- And at worst, can cause hanging and "tuple concurrently updated" errors when
  other clients try to do GRANT SELECT on the tables in question

This change makes it so the copy of SELECT privileges only happens when we
ingest the first batch into a new table, and never otherwise.

There is an existing test
test_migrate_add_column_not_at_end_permissions_preserved that test permissions
are preserved.
@michalc michalc force-pushed the feat/fewer-permission-copies branch from 52ace18 to 32804e6 Compare March 19, 2024 17:54
@michalc michalc merged commit 26d5ba9 into main Mar 19, 2024
120 checks passed
@michalc michalc deleted the feat/fewer-permission-copies branch March 19, 2024 17:58
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.

2 participants