BUG #1131: PQfinish hangs - Mailing list pgsql-bugs

From PostgreSQL Bugs List
Subject BUG #1131: PQfinish hangs
Date
Msg-id 20040413143213.855CECF5195@www.postgresql.com
Whole thread Raw
Responses Re: BUG #1131: PQfinish hangs  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1131
Logged by:          Walter Lübker

Email address:      w.luebker@t-online.de

PostgreSQL version: 7.4

Operating system:   suse linux 8.2

Description:        PQfinish hangs

Details:

I'm having some problems using libpq:

Some details:
OS: Suse Linux 8.2
Postgres version 7.4

The Server and client are at the same machine.

I made a connection to the Backend Server using libpq. Establish some
query's. Everything works fine. At end of my program I made a PQfinish.
Sometime's the system hangs in PQfinish !

snip:
        if(db->pg_conn != NULL){
            ConnStatusType = PQstatus(db->pg_conn);
            if(ConnStatusType == CONNECTION_OK){
                fprintf(stderr,"vor PQfinish\n\r");
                PQfinish(db->pg_conn);
                fprintf(stderr,"nach PQfinish\n\r");
            }else{
                (void)strcpy(dvs_info.subr, "PG_SQL_DENDE");
                dvs_info.code = ConnStatusType;
                (void)strcpy(dvs_info.sql_cmd, "PQfinish");
                (void)strcpy(dvs_info.text, "Fehler bei PQstatus");
                dvs_log_error();
            }
            db->pg_conn = NULL;
        }


Any help or ideas greatly appreciated,

Walter

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1130: server terminated by signal 11 (easy to duplicate)
Next
From: Stephan Szabo
Date:
Subject: Re: BUG #1130: server terminated by signal 11 (easy to