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

[Voyager] Add GRANT SQL for setting session_replication_role for PG 15+ and document the super user privilege for import data to source #2314

Open
1 task done
priyanshi-yb opened this issue Feb 11, 2025 · 0 comments

Comments

@priyanshi-yb
Copy link
Contributor

priyanshi-yb commented Feb 11, 2025

Jira Link: DB-15294

Description

In the fallback workflow, for the import data to source command, after cutover to target, we ask users to disable triggers and drop FK constraints on the source.
To avoid this manual effort of disable or drop the trigger and FKs and then re-enable or recreate them after cutover to source, import data to source command can set the session_replication_role if it has privileges that will disable the triggers and FK internally.
On PostgreSQL 15+, there is a GRANT statement that will grant the use of this session parameter to any user.

GRANT SET ON PARAMETER session_replication_role to <ybvoyager_user>;

But on PostgreSQL < 15, there is only superuser privilege which will allow using this session parameter.

Issue Type

kind/enhancement

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants