Re: [sqlalchemy] SQLAlchemy + multiprocessing problems

2022-03-31 Thread Evgenii
Works! Thank you! четверг, 31 марта 2022 г. в 15:42:25 UTC+3, Mike Bayer: > when using multiprocessing, the connection pool in the new process must be > replaced with a new one. This is usually accomplished by calling > engine.dispose(). However, to maintain the pool in the parent

Re: [sqlalchemy] SQLAlchemy + multiprocessing problems

2022-03-31 Thread Mike Bayer
when using multiprocessing, the connection pool in the new process must be replaced with a new one. This is usually accomplished by calling engine.dispose(). However, to maintain the pool in the parent process as well, replace the connection pool alone without disposing the old one:

[sqlalchemy] SQLAlchemy + multiprocessing problems

2022-03-31 Thread Evgenii
Hello! >From time to time, I need to update data in tables and multiprocessing can speed up this process. Last example: I’m trying to update data 7M rows in table SQLAlchemy 1.4.31, psycopg2 2.8.6, PostgreSQL def job_update_rd(data_list): updated = [] with Session() as session: