From: | Steve Singer <ssinger(at)ca(dot)afilias(dot)info> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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-25 14:59:21 |
Message-ID: | 51506649.2020300@ca.afilias.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 13-03-20 05:54 PM, Tom Lane wrote:
> Steve Singer <ssinger(at)ca(dot)afilias(dot)info> writes:
>
>> 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
>
>
So your proposing we do something like the attached patch? Where we
change conninfo_add_defaults to ignore an invalid PGSERVICE if being
called by PQconndefaults() but keep the existing behaviour in other
contexts where it is actually being used to establish a connection?
In this case even if someone takes the result of PQconndefaults and uses
that to build connection options for a new connection it should fail
when it does the pgservice lookup when establishing the connection.
That sounds reasonable to me.
Steve
Attachment | Content-Type | Size |
---|---|---|
conn_defaults.diff | text/x-patch | 4.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-03-25 15:06:25 | Re: pgsql: Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt. |
Previous Message | Joe Conway | 2013-03-25 14:56:22 | Re: pg_dump selectively ignores extension configuration tables |