The following bug has been logged online:
Bug reference: 4945
Logged by: dan boeriu
Email address: dan.boeriu@roost.com
PostgreSQL version: 8.3.6 8.3.7 8.4
Operating system: Redhat Linux
Description: Parallel update(s) gone wild
Details:
In my update I use one table to read from (let's call it READ TABLE) and
one table to update (let's call it WRITE TABLE).
Often the updates are started almost in parallel.
When I have 2 parallel updates the first one finishes but the second sends
the cpu to 100% and in certain situations it does never finish.
What I noticed is that the second will not finish if the READ table has many
rows to be read (1 million let's say) but it finishes when the read table
has only a few 1000s of rows.
Any idea why?
BTW - I disabled the triggers on both tables.
Also I tried with autovacuum=off and no difference.