Re: errbacktrace

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: errbacktrace
Date: 2019-10-26 12:37:45
Message-ID: cb7c3d86-72a9-69a1-07d0-041d8acdd4d6@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-09-30 20:16, Peter Eisentraut wrote:
> On 2019-09-27 17:50, Alvaro Herrera wrote:
>> On 2019-Sep-13, Alvaro Herrera wrote:
>>
>>> On 2019-Aug-20, Peter Eisentraut wrote:
>>>
>>>> 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.
>>>
>>> Here's an idea -- have the check/assign hooks create a different
>>> representation, which is a single guc_malloc'ed chunk that is made up of
>>> every function name listed in the GUC, separated by \0. That can be
>>> scanned at error time comparing the function name with each piece.
>>
>> Peter, would you like me to clean this up for commit, or do you prefer
>> to keep authorship and get it done yourself?
>
> If you want to finish it using the idea from your previous message,
> please feel free. I won't get to it this week.

I hadn't realized that you had already attached a patch that implements
your idea. It looks good to me. Maybe a small comment near
check_backtrace_functions() why we're not using a regular list. Other
than that, please go ahead with this.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-10-26 13:06:07 Re: Proposal: Add more compile-time asserts to expose inconsistencies.
Previous Message Quan Zongliang 2019-10-26 08:50:48 Restore replication settings when modifying a field type