{"id":7643,"date":"2016-09-28T16:20:54","date_gmt":"2016-09-28T14:20:54","guid":{"rendered":"http:\/\/code.openark.org\/blog\/?p=7643"},"modified":"2016-09-28T16:20:54","modified_gmt":"2016-09-28T14:20:54","slug":"three-wishes-for-a-new-year-4","status":"publish","type":"post","link":"https:\/\/code.openark.org\/blog\/mysql\/three-wishes-for-a-new-year-4","title":{"rendered":"Three wishes for a new year"},"content":{"rendered":"<p>(Almost) another new year by Jewish calendar. What do I wish for the following year?<\/p>\n<ol>\n<li>World peace<\/li>\n<li>Good health to all<\/li>\n<li>Relaxed GTID constraints<\/li>\n<\/ol>\n<p>I&#8217;m still not using GTID, and still see operational issues with working with GTID. As a latest example, our new schema migration solution, gh-ost, allows us to test migrations in production, on replicas. The GTID catch? <code>gh-ost<\/code>\u00a0has to write something to the binary log. Thus, it &#8220;corrupts&#8221; the replica with a bogus GTID entry that will never be met in another server, thus making said replica unsafe to promote. We can work around this, but&#8230;<\/p>\n<p>I understand the idea and need for the <code>Executed GTID Set<\/code>. It will\u00a0certainly come in handy with multi-writer InnoDB Cluster. However for most use cases GTID poses a burden. The reason is that our topologies are imperfect, and we as humans are imperfect, and operations are most certainly imperfect. We may wish to operate on a replica: test something, by intention or mistake. We may wish to use a subchain as the seed for a new cluster split. We may wish to be able to write to downstream replicas. We may use a 3rd party tool that issues a <code>flush tables with read lock<\/code>\u00a0without disabling <code>sql_log_bin<\/code>. Things just happen.<\/p>\n<p>For that, I would like to suggest GTID control levels, such as:<\/p>\n<ol>\n<li><em>Strict<\/em>: same as Oracle&#8217;s existing\u00a0implementation. Executed sets, purged sets, whatnot.<\/li>\n<li><em>Last executed<\/em>: a mode where the only thing that counts is the last executed GTID value. If I repoint replica,\u00a0all it needs to check is &#8220;hey this is my last executed GTID entry, give me the coordinates of yours. And, no, I don&#8217;t care about comparing executed and purged sets, I will trust you and keep running from that point on&#8221;<\/li>\n<li><em>Declarative<\/em>: GTIDs are generated, are visible in each and every binary log entry, but are completely ignored.<\/li>\n<\/ol>\n<p>I realize Oracle MySQL GTID is out for some over 3 years now, but I&#8217;m sorry &#8211; I still have reservations and see\u00a0use cases where I fear it will not serve me right.<\/p>\n<p>How about my previous years wishes? World peace and good health never came through, however:<\/p>\n<ul>\n<li>My <a href=\"http:\/\/code.openark.org\/blog\/mysql\/three-wishes-for-a-new-year-2015\">2015 wish<\/a> for &#8220;decent, operations friendly built in online table refactoring&#8221; was unmet, however <code>gh-ost<\/code>\u00a0is a thing now and exceeds my expectations. No, really. Please come see <a href=\"https:\/\/www.percona.com\/live\/plam16\/sessions\/introducing-gh-ost-triggerless-painless-trusted-online-schema-migrations\">Tom &amp; myself present gh-ost<\/a> and how it changed our migration paradigm.<\/li>\n<li>My <a href=\"http:\/\/code.openark.org\/blog\/mysql\/three-wishes-for-a-new-year-201\">2012 wish<\/a> for &#8220;decent, long waited for, implementation of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Window_function_%28SQL%29#Window_function\">Window Functions<\/a> (aka Analytic Functions) for MySQL&#8221; was met by\u00a0MariaDB&#8217;s <a href=\"https:\/\/mariadb.com\/kb\/en\/mariadb\/window-functions\/\">window functions<\/a>.<br \/>\nNot strictly Window Functions, but Oracle MySQL 8.0 will <a href=\"http:\/\/mysqlserverteam.com\/mysql-8-0-labs-recursive-common-table-expressions-in-mysql-ctes\/\">support CTE<\/a> (hierarchial\/recursive), worth a mention.<\/li>\n<\/ul>\n<p>See you in Amsterdam!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(Almost) another new year by Jewish calendar. What do I wish for the following year? World peace Good health to all Relaxed GTID constraints I&#8217;m still not using GTID, and still see operational issues with working with GTID. As a latest example, our new schema migration solution, gh-ost, allows us to test migrations in production, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[5],"tags":[125,113,121,51,8,21],"class_list":["post-7643","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-gh-ost","tag-gtid","tag-operations","tag-opinions","tag-replication","tag-sql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bZZp-1Zh","_links":{"self":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/7643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/comments?post=7643"}],"version-history":[{"count":1,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/7643\/revisions"}],"predecessor-version":[{"id":7644,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/7643\/revisions\/7644"}],"wp:attachment":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/media?parent=7643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/categories?post=7643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/tags?post=7643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}