PQfinish blocking on non-existent IP address ... - Mailing list pgsql-general

From Mad
Subject PQfinish blocking on non-existent IP address ...
Date
Msg-id 011f01cbc32d$4ae7c900$e0b75b00$@org
Whole thread Raw
In response to effective_io_concurrency  (Yves Weißig <weissig@rbg.informatik.tu-darmstadt.de>)
Responses Re: PQfinish blocking on non-existent IP address ...
List pgsql-general
/**********************************

How do I stop PQfinish from blocking?
(try any LAN IP address that doesn't exist on your LAN.)

I compiled it with both VC and MinGW, same result.

(change C:\Program Files (x86) to C:\Program Files for 32bit Windows OS)

Command Line Compile in VC 32bit:
cl x.cpp -I"C:\Program Files (x86)\PostgreSQL\8.4\include" -link "C:\Program
Files (x86)\PostgreSQL\8.4\lib\libpq.lib"

Command Line Compile in MinGW 32bit:
g++ x.cpp -o"x.exe" -I"C:\Program Files (x86)\PostgreSQL\8.4\include"
-L"C:\Program Files (x86)\PostgreSQL\8.4\lib" -llibpq

***********************************/

#include <stdlib.h>
#include <stdio.h>
#include <libpq-fe.h>

int main(int na,char** sa){
    printf("Connecting ...\n");
    PGconn* lpcn = PQconnectStart("dbname=postgres
host=192.168.250.60");
    printf("Connected\n");
    printf("Calling PQfinish\n");
    PQfinish(lpcn);
    printf("PQfinished\n");
    return 0;
};



pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: Why does a normally fast query run so slow when the table is in a partition?
Next
From: Mage
Date:
Subject: isn't "insert into where not exists" atomic?