Re: Inefficient bytea escaping? - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Inefficient bytea escaping?
Date
Msg-id 20060527162748.GD7450@svana.org
Whole thread Raw
In response to Re: Inefficient bytea escaping?  ("Marko Kreen" <markokr@gmail.com>)
Responses Re: Inefficient bytea escaping?
List pgsql-hackers
On Sat, May 27, 2006 at 06:36:15PM +0300, Marko Kreen wrote:
> >ISTM that in a single-threaded application such as the backend,
> >it should be libc's responsibility to avoid such overhead, not
> >ours.
>
> Obviously, except glibc guys seems to be philosophically
> opposed to this, so apps need to work around it.
>
> AFAIK at least *BSDs have got this right, don't know
> about others.

Given there is no way to know if you're running single threaded or not,
I don't think glibc can take chances like that.

In any case, this isn't the issue here. Glibc doesn't do any locking
unless pthread is linked in. Ofcourse, it takes a few cycles to
determine that, but I don't think that'd cause a major slowdown.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: LIKE, leading percent, bind parameters and indexes
Next
From: "Marko Kreen"
Date:
Subject: Re: Inefficient bytea escaping?