Do not load registry to backup a database. This is
allows backing up databases whose registry cannot
be instantiated at the moment (wrong version, missing
modules, etc.)
Closes#5775
When trying to duplicate a database, while
having opened connections to it, postgresql throws
```
OperationalError: source database "duplicate_test"
is being accessed by other users
DETAIL: There is 1 other session using the database.
```
Connections must be dropped before trying duplication
using TEMPLATE to avoid this.
This will allow to speed up our migration platform: as funzip can pipe
the output of the first file of the archive, even if the file is not
fully unzipped yet. This is useful to plays with dump.sql without waiting
for the full archive decompression.
- delete a forgotten print
- allow pg_dump custom dumps to be larger than the available disk size, the
previous commit allowed dumps to be larger than memory, this one remove this
limitation. zip dumps are still limited to by the disk size.
- let the user choose between the pg_dump custom format or the zip format including the filestore
- use file objects to allow dumps larger than memory
- postgres subprocess invocation is now clean and thread-safe, we dont touch the local process environ anymore
- add a manifest to the zip dump format with version information about odoo, postgres (pg_dump doesnt output it) and modules
It's broken (though easy to fix) and not very useful, if third parties want to
create databases asynchronously they can handle the asynchronicity on the
client-side (an HTTP request is easy to make asynchronously after all) and
call the synchronous `create_database()`.
fixes#1137, after a fashion
The new backup format is a zip containing the sql dump of the
database and the filestore of this database.
Old backups can still be restored
bzr revid: chs@openerp.com-20140304175656-iu3un6q43ttnhjfz
Either use openerp.modules.registry.RegistryManager when the full
new() signature is needed, or use openerp.registry().
Replaced also some pool.get() with pool[] because KeyErrors
are better than AttributeErrors on None.
bzr revid: vmt@openerp.com-20130327111014-2i0hlvpy5y5ku7hm
- The exception is not logged in tools.convert. It is loggeg by the netsv layer anyway.
- The exception is re-raised instead, but with the full traceback available.
- A fix in openerp.service.db where the cr is closed twice.
bzr revid: vmt@openerp.com-20130219163047-3q766awd66wkzsn7