Search Postgresql Archives

Re: Replacing a production db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/18/2014 1:05 PM, Nicolás Lichtmaier wrote:
Is there a way to replace a production database with another as part of a new "release" of our website?

Where I work we have a scheme of pushing code+db releases to "testing" and then to "production". Most of our databases use MySQL and I was told they can just rename the db and it works. We are adopting PostgreSQL for some new developments and we'd like to do something similar. I've tried loading the dump in a single transaction, but that has many problems as the database is fairly big for that (some GBs). Is there a trick I'm missing here?

we do updates of our production systems with .sql files that are version deltas, eg, they alter existing tables and add new ones, possibly including new 'static data'. if the update requires code changes, then we shut the app(s) down, run the database upgrade, install the new code, and restart the app(s). Usually we try to do our schema updates so the old code will continue to work with the new schema, so the new code can be cut in incrementally with virtually zero downtime.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux