3 ms·
Ed: obviously this does not solve the bigger service of providing "magic" scale up/down, though. It looks like the "branching schema" is essentially: CREATE D
by e12e 5y ago
Ed: obviously this does not solve the bigger service of providing "magic" scale up/down, though.
It looks like the "branching schema" is essentially:
CREATE DATABASE branch_name WITH TEMPLATE main;
I might actually have to try this - I hadn't really thought template dbs would be all that useful in pg - but this branch and test för dev use-case is interesting.
Then there's COPY (for data) and rename to "promote" a branch with data (one would probably want to run DDL on main db though:
ALTER DATABASE branch_name RENAME TO main; -- would have to move old main out of the way first - but might be possible in same transaction?