From: | "Mad" <MadHtr(at)Schif(dot)org> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: PQfinish blocking on non-existent IP address ... |
Date: | 2011-02-03 03:55:40 |
Message-ID: | 001b01cbc356$399aa130$accfe390$@org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hmm ... It would appear that is it actually WSACleanup() that is taking
forever. I Added a WSAStartup() and a WSACleanup(), and it hung for awhile
on WSACleanup() instead of PQfinish() :)
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Mad
Sent: Wednesday, February 02, 2011 6:03 PM
To: pgsql-general(at)postgresql(dot)org
Cc: madhtr(at)schif(dot)org
Subject: [GENERAL] PQfinish blocking on non-existent IP address ...
/**********************************
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;
};
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2011-02-03 05:34:47 | Re: Why does my DB size differ between Production and DR? (Postgres 8.4) |
Previous Message | Peter Geoghegan | 2011-02-03 03:49:24 | Re: Why does my DB size differ between Production and DR? (Postgres 8.4) |