Re: [HACKERS] Getting rid of "unknown error" in dblink and postgres_fdw

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Getting rid of "unknown error" in dblink and postgres_fdw
Дата
Msg-id 20648.1482339934@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Getting rid of "unknown error" in dblink and postgres_fdw  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Wed, Dec 21, 2016 at 9:49 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> A possible objection is that if we really are on the hairy edge of OOM,
>> trying to construct such error strings might push us over the edge

> What am I missing here?  Constructing said string occurs on the local end
> of the connection but the memory problem exists on the remote end.

Um, that's not clear, in fact it's not likely.  The backend usually
manages to tell you so if it's out of memory --- or, worst case, it
crashes trying, in which case the local libpq ought to gin up a report
about loss of connection.  So the root cause I'm suspecting is that
the local libpq was unable to obtain memory for a PGresult or something
like that.  That theory has some holes of its own, because libpq also
keeps some cards up its sleeve that usually let it report out-of-memory
successfully, but it's the best I can do with the info at hand.

In any case, the point of the error style guidelines is that it's *always*
possible to do better than "unknown error"; now that it's been proven
that this case is reachable in the field, we should try harder.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Getting rid of "unknown error" in dblink and postgres_fdw
Следующее
От: Joe Conway
Дата:
Сообщение: Re: [HACKERS] Getting rid of "unknown error" in dblink andpostgres_fdw