Re: pg_upgrade segfaults when given an invalid PGSERVICE value

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_upgrade segfaults when given an invalid PGSERVICE value
Дата
Msg-id 5337.1363797032@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_upgrade segfaults when given an invalid PGSERVICE value  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: pg_upgrade segfaults when given an invalid PGSERVICE value  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Tue, Mar 19, 2013 at 10:12:21AM -0400, Steve Singer wrote:
>>> *  Should we document this?

>> Yes the documentation should indicate that PQconndefaults() can
>> return NULL for more than just memory failures.

> The attached patch fixes this.  I am unclear about backpatching this as
> it hits lot of code, is rare, and adds new translation strings.  On the
> other hand, it does crash the applications.

I don't particularly care for hard-wiring knowledge that bad service
name is the only other reason for PQconndefaults to fail (even assuming
that that's true, a point not in evidence ATM).  I care even less for
continuing to use ERRCODE_FDW_OUT_OF_MEMORY for errors clearly outside
its meaning.

I think we should either change PQconndefaults to *not* fail in this
circumstance, or find a way to return an error message.
        regards, tom lane



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Problem with background worker
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: A few string fixed