Re: PostGres Doubt - Mailing list pgsql-hackers

From David Ford
Subject Re: PostGres Doubt
Date
Msg-id 3D092EC8.5040608@blue-labs.org
Whole thread Raw
In response to Re: PostGres Doubt  ("Dann Corbit" <DCorbit@connx.com>)
Responses Re: PostGres Doubt  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: PostGres Doubt  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I'm using md5 in pg_hba.conf.  That is the method, no?

I'm writing a milter application which instantiates a private resource 
for each thread upon thread startup.  I have priv->conn which I 
establish as priv->conn=PQconnectdb(connstr), connstr is const char 
*connstr="host=10.0.0.5 dbname=bmilter user=username password=password";

It segfaults depending on it's mood but it tends to happen about 50-70% 
of the time.  I switched to PQsetdbLogin() which has worked perfectly. I don't really want to use that however, I would
muchprefer using my 
 
connstr.

Am I missing something?

Thanks,
David

Tom Lane wrote:

>David Ford <david+cert@blue-labs.org> writes:
>  
>
>>So reentrancy in libpq basically is put on hold until 7.3.
>>    
>>
>
>Only if you insist on using "crypt", which is deprecated anyway.
>md5 is the preferred encryption method.
>
>My feeling about the proposed patch was that crypt is now a legacy auth
>method, and it's not clear that we should create platform/library
>dependencies just to support making multiple connections simultaneously
>under crypt auth.  (Note that *using* connections concurrently is not
>at issue, only whether you can execute the authentication phase of
>startup concurrently.)
>
>            regards, tom lane
>  
>



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Making serial survive pg_dump
Next
From: David Ford
Date:
Subject: ATTN: Tom Lane