Re: Inserting large number of rows using libpq++ stops responding in c++ - Mailing list pgsql-general

From Tom Lane
Subject Re: Inserting large number of rows using libpq++ stops responding in c++
Date
Msg-id 27285.1038769253@sss.pgh.pa.us
Whole thread Raw
In response to Inserting large number of rows using libpq++ stops responding in c++  (Taz Master <tazmaster@rocketmail.com>)
Responses Re: Inserting large number of rows using libpq++ stops responding in c++  (Taz Master <tazmaster@rocketmail.com>)
Re: Inserting large number of rows using libpq++ stops responding in c++  (Taz Master <tazmaster@rocketmail.com>)
List pgsql-general
Taz Master <tazmaster@rocketmail.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

pgsql-general by date:

Previous
From: Taz Master
Date:
Subject: Inserting large number of rows using libpq++ stops responding in c++
Next
From: "Han Holl"
Date:
Subject: Re: Memory leak with palloc