Thread: C++ interface problem with libpq.so.3

C++ interface problem with libpq.so.3

From
Kemin Zhou
Date:
I have writte a simple program to access PGDB from a C++ program using 
the libpq++-4.0

Most of time it runs perfect.  This morning, it was working fine.  Then 
later it stopped working.
The symptom is that my program went to asleep.

The stack trace:

#0  0xffffe002 in ?? ()
#1  0x40120808 in pqSocketPoll () from /usr/local/pgsql/lib/libpq.so.3
#2  0x401206ed in pqSocketCheck () from /usr/local/pgsql/lib/libpq.so.3
#3  0x401205f7 in pqWaitTimed () from /usr/local/pgsql/lib/libpq.so.3
#4  0x401205b6 in pqWait () from /usr/local/pgsql/lib/libpq.so.3
#5  0x4011e13a in PQgetResult () from /usr/local/pgsql/lib/libpq.so.3
#6  0x4011e3fb in PQexecFinish () from /usr/local/pgsql/lib/libpq.so.3
#7  0x4001a722 in PgConnection::Exec(char const*) ()  from /usr/local/pgsql/lib/libpq++.so.4
#8  0x4001a798 in PgConnection::ExecTuplesOk(char const*) ()  from /usr/local/pgsql/lib/libpq++.so.4
#9  0x0804d695 in main (argc=9, argv=0xbfffd6d4) at tabaln.cpp:112
#10 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6

=====
looks like that it is having trouble loading a function.

Is my computer system screewed up, is my compiler (gcc 3.3) doing 
something wrong, or what?
If you have seen this behavior let me know.  I am kind of having no clue 
where to start.

Kemin



**********************************************************************
Proprietary or confidential information belonging to Ferring Holding SA or to one of its affiliated companies may be
containedin the message. If you are not the addressee indicated in this message (or responsible for the delivery of the
messageto such person), please do not copy or deliver this message to anyone. In such case, please destroy this message
andnotify the sender by reply e-mail. Please advise the sender immediately if you or your employer do not consent to
e-mailfor messages of this kind. Opinions, conclusions and other information in this message represent the opinion of
thesender and do not necessarily represent or reflect the views and opinions of Ferring.
 
**********************************************************************



Re: C++ interface problem with libpq.so.3

From
Tom Lane
Date:
Kemin Zhou <kemin.zhou@ferring.com> writes:
> I have writte a simple program to access PGDB from a C++ program using 
> the libpq++-4.0
> Most of time it runs perfect.  This morning, it was working fine.  Then 
> later it stopped working.
> The symptom is that my program went to asleep.

Looks to me like it's just waiting for a response from the backend.  I'd
suggest looking into what the backend is doing.  I doubt you have an
"interface" problem at all...
        regards, tom lane


Re: C++ interface problem with libpq.so.3

From
Kemin Zhou
Date:
Tom Lane wrote:

>Kemin Zhou <kemin.zhou@ferring.com> writes:
>  
>
>>I have writte a simple program to access PGDB from a C++ program using 
>>the libpq++-4.0
>>Most of time it runs perfect.  This morning, it was working fine.  Then 
>>later it stopped working.
>>The symptom is that my program went to asleep.
>>    
>>
>
>Looks to me like it's just waiting for a response from the backend.  I'd
>suggest looking into what the backend is doing.  I doubt you have an
>"interface" problem at all...
>
>            regards, tom lane
>
>  
>
I figured out my problem.  I gave a BEGIN; command and forgot to type 
COMMIT or ROLLBACK.
The access to this table is blocked.  So my front end went to sleep 
(waiting for ever).  Hope this may
be useful to other people.

Kemin



**********************************************************************
Proprietary or confidential information belonging to Ferring Holding SA or to one of its affiliated companies may be
containedin the message. If you are not the addressee indicated in this message (or responsible for the delivery of the
messageto such person), please do not copy or deliver this message to anyone. In such case, please destroy this message
andnotify the sender by reply e-mail. Please advise the sender immediately if you or your employer do not consent to
e-mailfor messages of this kind. Opinions, conclusions and other information in this message represent the opinion of
thesender and do not necessarily represent or reflect the views and opinions of Ferring.
 
**********************************************************************