Forgive me if I’m missing something, but in the case of adding a default value, you wouldn’t need to manage the application, correct? I.e.:
- T0: Aa, Ab, and Ac are all filling in the value of Column1 app-side.
- T1: ALTER TABLE to add a default value to Column1 initiated.
- T2: ALTER TABLE completes.
At T2, your application is still (presumably) filling in the value of Column1 for all rows. You’ve just made the application more resilient if a value happened to be absent due to a bug, but continuing insert values into a column with a default will not throw an exception.
As far as the general question is concerned, it would depend a whole lot on how your app is actually deployed; there’s not a one-size-fits all solution. Broadly speaking, if you needed functionality to only change after an upgrade is complete across three nodes, then each node would need to:
- know what version it’s running,
- know what version other nodes are running,
- if it’s on v2, and any node is on v1, then continue acting as if it’s on v1, and
- if it’s on v2, and all other nodes are on v2, then act if it’s on v2.
The specifics matter a lot, though, and as I mentioned above in the case of adding a default value, there’s no need to manage versions like this; in the presence of a default value on a column, the app could provide a value for the column, or not, and it would be fine.
Hope that helps!