Parallel insert to postgresql with thread
exarkun at divmod.com
Thu Oct 25 17:12:14 CEST 2007
On Thu, 25 Oct 2007 09:46:54 -0500, Erik Jones <erik at myemma.com> wrote:
>Fortunately, in his case, that's not necessarily true. If they do
>all their work with the same connection then, yes, but there are
>other problems with that as mention wrt thread safety and psycopg2.
>If he goes the recommended route with a separate connection for each
>thread, then Postgres will not serialize multiple inserts coming from
>separate connections unless there is something like and ALTER TABLE
>or REINDEX concurrently happening on the table. The whole serialized
>inserts thing is strictly something popularized by MySQL and is by no
>means necessary or standard (as with a lot of MySQL).
PostgreSQL won't serialize inserts to the same table with a sequence
column? Wow. :)
More information about the Python-list