Skip to content
Snippets Groups Projects
Commit d077b224 authored by Christopher Ormaza's avatar Christopher Ormaza Committed by Xavier Morel
Browse files

[FIX] core: disable wait_callback during copy_from


Apparently some solutions (e.g. bitnami) deploy odoo using async
workers, and not all pg/psycopg2 features are supported in that mode,
notably COPY FROM (bulk-copying data from a stream to postgres). Work
around this issue by disabling "async mode" as we do the copy (by
resetting the wait callback) then re-enabling it.

While this is not an officially supported run mode, it should Do No
Harm™ for normal operations and could help users and clients.

Of important note: while this fixes an error running in async mode, it
will also prevent the worker from yielding while copy_from is
executing. Hopefully that doesn't take too long (as the entire point
of the copy_from is to be fast) but there you are.

Fixes odoo/odoo#24145

closes odoo/odoo#43465

X-original-commit: c4583cf8
Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
parent 7b5efd53
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment