Merge lp:~therp-nl/openupgrade-server/7.0-migrate_script_with_template into lp:openupgrade-server
Proposed by
Stefan Rijnhart (Opener)
Status: | Merged |
---|---|
Merged at revision: | 4646 |
Proposed branch: | lp:~therp-nl/openupgrade-server/7.0-migrate_script_with_template |
Merge into: | lp:openupgrade-server |
Diff against target: |
69 lines (+33/-26) 1 file modified
scripts/migrate.py (+33/-26) |
To merge this branch: | bzr merge lp:~therp-nl/openupgrade-server/7.0-migrate_script_with_template |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Holger Brunn (Therp) | code review | Approve | |
Pedro Manuel Baeza | code review | Approve | |
Review via email: mp+210619@code.launchpad.net |
Commit message
[RFR] Copy database within the database server
Description of the change
This change copies the database within the database server instead of performing the pg_dump/restore round trip. Apart from a code simplification, this change also allows the script to continue in this environment that I am currently working in, in which the pg utils mysteriously ignore the PGUSER/PASSWORD environment variables.
To post a comment you must log in.
This will fail miserably if someone uses the database (an open cursor is enough) to be migrated.
But indeed, the template way is faster and nicer. How about trying that first, catch the exception if the db is in use and then do it with pg_dump?