Re: --enable-thread-safety bug - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: --enable-thread-safety bug
Date
Msg-id 20080322165740.GB7230@svana.org
Whole thread Raw
In response to Re: --enable-thread-safety bug  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Sat, Mar 22, 2008 at 12:42:51PM -0400, Tom Lane wrote:
> > Do you create and destroy a lot of threads since it seems this memory
> > won't be freed?
>
> The OP's program isn't threaded at all, since he was apparently running
> with a non-threaded ecpg/libpq before.  This means that the proposal of
> looping till someone else frees memory is at least as silly as allowing
> the core dump to happen.

I found an old report where someone found that the get/setspecific
wasn't working and it was allocating a new version of the structure
each time.

http://www.mail-archive.com/pgsql-general@postgresql.org/msg42918.html

That was on Solaris though. It would be instructive to test that by
calling that function multiple times successivly and ensure it's
returning the same addess each time.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Attachment

pgsql-general by date:

Previous
From: Steve Clark
Date:
Subject: Re: --enable-thread-safety bug
Next
From: Alvaro Herrera
Date:
Subject: Re: dynamically generated SQL and planner/performance