-
Notifications
You must be signed in to change notification settings - Fork 12
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
Do not check for enabled triggers / FKs for fallback workflow of PG if session_replication_role session variable is used #2322
Conversation
…f session_replication_role session variable is used
…rgetConf stored and session vars are already available
yb-voyager/src/tgtdb/postgres.go
Outdated
@@ -115,6 +116,9 @@ func (pg *TargetPostgreSQL) Init() error { | |||
if err != nil { | |||
return err | |||
} | |||
if len(pg.tconf.SessionVars) == 0 { | |||
pg.tconf.SessionVars = getYBSessionInitScript(pg.tconf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably use a different function/vars for this. PG and YB will have different set of session params? The function also does some YB specific stuff - for example checking in /etc/yb-voyager/ybSessionVariables.sql
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So other than the yb-enable-upsert
session variable (which is run based on tconf.EnableUpsert
), all are common for PG/YB so didn't feel the need right now but yeah we can have separate ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…f session_replication_role session variable is used (#2322) Adding GRANT SQL for granting the SET on session_replication_role to source-db-user to utilize it in Fallback case for import data to source Added a check in GetEnabledTriggersAndFks(), to not fetch the triggers/Fks in case this session parameter is used.
Describe the changes in this pull request
session_replication_role
to source-db-user to utilize it in Fallback case forimport data to source
Describe if there are any user-facing changes
Yes, new grant is added in script and guardrail check is fixed for handling the case where
session_replication_role
is used.How was this pull request tested?
Manually
Does your PR have changes that can cause upgrade issues?