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

BUG #2059: PGConnect fails when used in a thread

From: "Chris Storah" <chris(dot)storah(at)orionsmg(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2059: PGConnect fails when used in a thread
Date: 2005-11-21 00:52:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

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

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

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).


pgsql-bugs by date

Next:From: Manideep KalisettyDate: 2005-11-21 05:08:48
Subject: BUG #2060: Issue with Data base connection
Previous:From: Tom LaneDate: 2005-11-20 22:28:11
Subject: Re: postgresql8.1 crushes on some inserts/updates in KOI8 encoding

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