8 ms·
You could easily create a new revision of the function you want to change, and have the first box to use the new revision while the rest keep using the old one.
by anonymous23801 4y ago
You could easily create a new revision of the function you want to change, and have the first box to use the new revision while the rest keep using the old one.
In postgres that would be trivial with revision schemas and a clever usage of the SEARCH_PATH.
- Smeevy 4y agoThat is a neat idea. I was sort of thinking of that, but was concerned about invalid and unused database objects. You'd avoid name collisions pretty handily, though. I'm guessing that you would just need some policy to drop all of the old versions after some period. You'd also just need to bundle grant exec statements with the procedure DDL. That would work well with Oracle and DB2 as well. I'm not totally sure about SQL Server, though.
- swaranga 4y agoSure, it works for a narrow use-case like a pure function that just queries and returns data. What about stored procedures/triggers that mutate data on insert/delete etc? With one-box, you can assign a specific set of customers/canaries to be served by the new 1-box and validate your results. If there is a problem you rollback and only your canary data was affected. It is just not very simple IMO.