Unix Technical Forum

BUG #2059: PGConnect fails when used in a thread

This is a discussion on BUG #2059: PGConnect fails when used in a thread within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2059 Logged by: Chris Storah Email address: chris.storah@orionsmg.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:28 AM
Chris Storah
 
Posts: n/a
Default BUG #2059: PGConnect fails when used in a thread


The following bug has been logged online:

Bug reference: 2059
Logged by: Chris Storah
Email address: chris.storah@orionsmg.com
PostgreSQL version: 8.0.3
Operating system: Linux - Fedora Core 4 x86_64 version
Description: PGConnect fails when used in a thread
Details:

fe-connect.c in the src/interfaces/libpq directory is segfaulting when a
PQconnectdb is called from a thread (works when called from the main
application).

fe-connect.c - parseServiceInfo is failing because no service option is
being used in the connection string so service is NULL. The line that fails
is the 'snprintf(serviceFile, MAXPGPATH, "%s/pg_service.conf", ...) line. If
this is moved into the 'if (service != NULL)' section of code, everything
works fine (as it is never called when no service is specified).

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:28 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2059: PGConnect fails when used in a thread

"Chris Storah" <chris.storah@orionsmg.com> writes:
> fe-connect.c - parseServiceInfo is failing because no service option is
> being used in the connection string so service is NULL. The line that fails
> is the 'snprintf(serviceFile, MAXPGPATH, "%s/pg_service.conf", ...) line.


Huh? That statement doesn't use 'service', so your analysis makes no
sense. I agree it's a bit inefficient as coded, but I can't see that it
would crash. You have other problems to look for.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:02 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com