You can’t; Not without writing some custom tool to check your schemas.
That is the root of the original question. Yes you can, in some way you have to take data out and inject it into your monitoring solution. Off the top of my head, simply doing a show create table of everything in order put into a hash function would allow this. Perhaps there is the right kind of metadata in some table that this could turn into a single select statement put into a hash method SHA().
I also want to question your application design.
I’m not sure this thread gave any information on application design.
Constant DDL’s are not normal and your application sounds like it was not designed correctly for a clustered architecture.
I’ve re-read this thread a few times and I don’t see any references to the frequency. Can you expand more on the information you used to deduce the application design?
I would re-evaluate why your application needs to run DDLs so often.
It could be the DDL changes happen once every 5 years or every 5 minutes. How does that impact the answer to the question? I believe if you actually knew the frequency, you would not have felt it necessary to make this point.
But I agree, whatever scenario you must be envisioning sounds really bad. A system that is constantly changing DDL would be very strange. I honestly have a hard time imaging an application design that uses DDL changes as a central part of its functionality. If you happen to have references to clients doing this, I think it would be a fascinating read.
Fundamentally the idea is to identify differences when a mechanism is used outside of the normal procedure. Switching to TOI solves a very narrow scope of this issue, and adds exposure in all new ways. If a drop table command comes in, now it is gone, everywhere. An alter will most certainly lock everything up.
Let’s pretend we’re replicating is near the limit of applying to a cluster PXC. Using PTOSC on a 4TB table is going to inject enough records, soaking up whatever slack the remaining replication stream has in terms of capacity. I haven’t done the math, but it makes my head hurt to just think about needing to re-duplicate all the records like this. Does --max-load only references local variables, and thus things like replication impact require some more custom work?
I will admit though, that when we first used the tool under production loads the cluster crashed. If you look at the history, the surface area of possible bugs increases when using a tool like this.
Can we agree there are conditions which make it more impractical? Attempts to minimize any kind of risk to the system. Being able to make big changes to a node that has been isolated from the cluster, is in some ways risk mitigation.
Given a system that is using RSU, even if it is set as-needed. The update can be automated and properly managed, but we’d like to have a simplistic monitor that clues us that something might be different. Certainly we’re creating the link between the DB and the monitor. Any advice that would simplify table structure comparison?