Re: pg_upgrade segfaults when given an invalid PGSERVICE value

Поиск
Список
Период
Сортировка
От Steve Singer
Тема Re: pg_upgrade segfaults when given an invalid PGSERVICE value
Дата
Msg-id 51506649.2020300@ca.afilias.info
обсуждение исходный текст
Ответ на Re: pg_upgrade segfaults when given an invalid PGSERVICE value  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_upgrade segfaults when given an invalid PGSERVICE value  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
On 13-03-20 05:54 PM, Tom Lane wrote:
> Steve Singer <ssinger@ca.afilias.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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: pg_dump selectively ignores extension configuration tables
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt.