Re: pg_upgrade segfaults when given an invalid PGSERVICE value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Steve Singer <ssinger(at)ca(dot)afilias(dot)info>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade segfaults when given an invalid PGSERVICE value
Date: 2013-03-20 21:54:50
Message-ID: 23469.1363816490@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Steve Singer <ssinger(at)ca(dot)afilias(dot)info> writes:
> On 13-03-20 02:17 PM, Bruce Momjian wrote:
>> I think the concern is that the services file could easily change the
>> defaults that are used for connecting, though you could argue that the
>> real defaults for a bad service entry are properly returned.

> Yes, my concern is that if I have a typo in the value of PGSERVICE I
> don't want to end up getting connected a connection to localhost instead
> of an error.

> From a end-user expectations point of view I am okay with somehow
> marking the structure returned by PQconndefaults in a way that the
> connect calls will later fail.

Unless the program changes the value of PGSERVICE, surely all subsequent
connection attempts will fail for the same reason, regardless of what
PQconndefaults returns?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-03-20 22:14:05 Re: [HACKERS] Call for Google Summer of Code mentors, admins
Previous Message Peter Geoghegan 2013-03-20 21:50:55 Should commit_delay be PGC_SIGHUP?