Re: errbacktrace

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: errbacktrace
Дата
Msg-id c5cf3901-4d9f-6d2c-01f8-f69d7b02b84f@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: errbacktrace  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: errbacktrace  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 2019-08-13 15:24, Alvaro Herrera wrote:
> On 2019-Aug-13, Peter Eisentraut wrote:
> 
>> I have changed the configuration setting to backtrace_functions plural,
>> so that you can debug more than one location at once.  I had originally
>> wanted to do that but using existing functions like
>> SplitIdentifierString() resulted in lots of complications with error
>> handling (inside error handling!).  So here I just hand-coded the list
>> splitting.  Seems simple enough.
> 
> Hmm ... but is that the natural way to write this?  I would have thought
> you'd split the list at config-read time (the assign hook for the GUC)
> and turn it into a List of simple strings.  Then you don't have to
> loop strtok() on each errfinish().

The memory management of that seems too complicated.  The "extra"
mechanism of the check/assign hooks only supports one level of malloc.
Using a List seems impossible.  I don't know if you can safely do a
malloc-ed array of malloc-ed strings either.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Fix typos and inconsistencies for HEAD (take 11)