Open shlomi-noach opened 8 years ago
in the meantime, it might be nice to have a --yes-it-has-triggers-ignore-them
option... I'm looking at a 300 GB table which has triggers that I am happy to deal with manually... #152 made gh-ost check and bail on presence of triggers. a method of explicitly overriding that behavior would help greatly
@allixsenos can you please open a new issue for this so we can track it?
"Preferably the triggers are read at migration start, not at cut-over phase" - why?
Surely reading them at the point you want to recreate them is more correct (what if a trigger is altered during a migration)?
@MarkLeith you are correct. My initial thought was to save time. The cut-over phase is the time where tables are locked, and I am a bit afraid of spending this time on even more operations.
I can also argue that anyone modifying the triggers while migration is running is on the right track to shooting themselves in the foot.
Having said all that the most ultimatest correctest behavior is to read trigger info while cutting over.
@shlomi-noach Are there any new insights into this issue? I am interested to give it a try.
@bancer no new insights on my side; I haven't given this thought.
Triggers can be supported by
gh-ost
. This is not on our immediate roadmap, and so it's an ideal opportunity for community contribution.Some notes:
before|after
,insert|delete|update
)ghost
table should NOT have triggers.this.waitForEventsUpToLock()
)gh-ost
resumes writes onto the ghost tables (no problem if original table resumes writes)gh-ost
supports two types of cut-over, and both must be supported.Anyone who is interested to jump on this please let me know beforehand. Thank you!