Taz Master <tazmaster(at)rocketmail(dot)com> writes:
> My only theory as to what might be causing this would be the large
> number of SQL commands executed before the commit. Is this right?
No. 100 inserts hardly qualifies as "a large number" -- people
routinely run transactions with many thousand commands.
I'm guessing a bug in your own code, though it's possible that libpq++
is the source of the problem.
If you have any other clients active at the same time, it's also
possible that there is no bug, and the thing is simply waiting for
a lock held by some other client. This would be more likely if you
have foreign keys in the table being inserted into --- foreign key
references take write-locks on the referenced rows.
regards, tom lane