Skip site navigation (1) Skip section navigation (2)

Re: Re: [BUGS] libpq does not manage SSL callbacksproperly when other libraries are involved.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Russell Smith <mr-russ(at)pws(dot)com(dot)au>, PoolSnoopy <tlatzelsberger(at)gmx(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Re: [BUGS] libpq does not manage SSL callbacksproperly when other libraries are involved.
Date: 2008-11-07 20:10:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
Bruce Momjian wrote:

> Thanks for the review, Magnus.  I have adjusted the patch to use the
> same mutex every time the counter is accessed, and adjusted the
> pqsecure_destroy() call to properly decrement in the right place.
> Also, I renamed the libpq global destroy function to be clearer
> (the function is not exported).

There's a problem in this patch which is that it is inconsistent in its
use of the ENABLE_THREAD_SAFETY symbol.  init_ssl_system() is only going
to keep the refcount in the threaded compile; but the safeguards are
needed even when threading is not enabled.  Moreover,
destroy_ssl_system() is locking thread mutexes outside
ENABLE_THREAD_SAFETY which is going to cause non-threaded builds to

As a suggestion, I'd recommend not fooling around with backend files
when you're only modifying libpq.  It enlarges the patch without
benefit.  I think that patch should be committed separately.

Alvaro Herrera                      
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2008-11-07 20:12:50
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1197)
Previous:From: David E. WheelerDate: 2008-11-07 19:58:57
Subject: Re: [RRR] Tests citext casts

pgsql-bugs by date

Next:From: Luiz K. MatsumuraDate: 2008-11-07 22:30:04
Subject: Bug fix request for 08.03.0400 ( was [BUGS] Behavior change of FK info query)
Previous:From: Tom LaneDate: 2008-11-07 14:03:12
Subject: Re: Getting "FATAL: unexpected data beyond EOF in block 1 of relation 1663/1/1255/0" on Mac OS during initdb

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group