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

Getting by without SUPER privilege #132

Closed
teu opened this issue Aug 3, 2016 · 10 comments
Closed

Getting by without SUPER privilege #132

teu opened this issue Aug 3, 2016 · 10 comments
Assignees

Comments

@teu
Copy link

teu commented Aug 3, 2016

Hi,
we have case in which we would like to use gh-ost with AWS RDS. However, the problem with this managed database store is that it does not grant us the SUPER privilege.
Is there any way of using gh-ost and not having SUPER on the server?
Thanks

@teu teu changed the title Betting by without SUPER privilege Getting by without SUPER privilege Aug 8, 2016
@shlomi-noach shlomi-noach self-assigned this Aug 11, 2016
@shlomi-noach
Copy link
Contributor

looking into this

@shlomi-noach
Copy link
Contributor

The first blocker I see right away is that SUPER is required for STOP SLAVE and START SLAVE.

Why do we need these two in the first place? Because gh-ost may be asked to switch binlog_format to ROW. In which case it issues:

  • set global binlog_format='ROW'
  • set session binlog_format='ROW'

However if the replica was running with STATEMENT, merely changing to ROW means nothing; the replication must be STOPped and STARTed for the setting to take effect. gh-ost does not want to assume it was set up correctly before running; therefore it always issues a STOP & START.

We could add a flag saying --trust-me-this-is-rbr to skip the above. I don't like it, but it's possible.

@SuperQ
Copy link
Contributor

SuperQ commented Aug 11, 2016

It should be possible to pre-test for RBR and not require SUPER.

@shlomi-noach
Copy link
Contributor

@SuperQ how can you you confirm without doubt the replica is using RBR? Please read again my comment.

@shlomi-noach
Copy link
Contributor

To elaborate: you see a replica. It says it has binlog_format=ROW. Fact: it may replicate via SBR, because maybe someone set global binlog_format=ROW without restarting replication.

It sounds far fetched, but in fact is a classic case in --switch-to-rbr

@shlomi-noach
Copy link
Contributor

#156 will close this Issue, and will make it possible to run gh-ost without SUPER privilege.

@shlomi-noach
Copy link
Contributor

I'm happy to merge #156 , and see thoughts on SBR/RBR in comment: #156 (comment)

@shlomi-noach
Copy link
Contributor

SUPER is now not required for normal migration, see #156 and release https://github.com/github/gh-ost/releases/tag/v1.0.10

It is still required in --test-on-replica, see discussion on #162 and on #163

@shlomi-noach
Copy link
Contributor

Hooks have been merged, and remove the last barrier for SUPER. I will write more about this on next release, which is expected early next week, at which time this bug will be closed.

@shlomi-noach
Copy link
Contributor

all done

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

3 participants