Re: pg_upgrade segfaults when given an invalid PGSERVICE value

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

On Wed, Mar 20, 2013 at 01:30:20PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > On Wed, Mar 20, 2013 at 12:30:32PM -0400, Tom Lane wrote:
> >> I think we should either change PQconndefaults to *not* fail in this
> >> circumstance, or find a way to return an error message.
>
> > Well, Steve Singer didn't like the idea of ignoring a service lookup
> > failure. What do others think? We can throw a warning, but there is no
> > way to know if the application allows the user to see it.
>
> Short of changing PQconndefaults's API, it seems like the only
> reasonable answer is to not fail *in the context of PQconndefaults*.
> We could still fail for bad service name in a real connection operation
> (where there is an opportunity to return an error message).

Yes, that is _a_ plan.

> While this surely isn't the nicest answer, it doesn't seem totally
> unreasonable to me. A bad service name indeed does not contribute
> anything to the set of defaults available.

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.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-03-20 18:24:50 Re: Materialized view assertion failure in HEAD
Previous Message Tom Lane 2013-03-20 18:02:32 Let's invent a function to report lock-wait-blocking PIDs