Re: Printing backtrace of postgres processes - Mailing list pgsql-hackers

From vignesh C
Subject Re: Printing backtrace of postgres processes
Date
Msg-id CALDaNm1K8wAQ-zTmbyVuHXJszgKfUQh6tGrdfDuWm2Fe=jfobQ@mail.gmail.com
Whole thread Raw
In response to Re: Printing backtrace of postgres processes  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Printing backtrace of postgres processes
Re: Printing backtrace of postgres processes
List pgsql-hackers
On Wed, Jan 26, 2022 at 11:07 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Tue, Jan 25, 2022 at 12:00 PM vignesh C <vignesh21@gmail.com> wrote:
> > Thanks for the comments, attached v17 patch has the fix for the same.
>
> Have a minor comment on v17:
>
> can we modify the elog(LOG, to new style ereport(LOG, ?
> + elog(LOG_SERVER_ONLY, "current backtrace:%s", errtrace.data);
>
> /*----------
>  * New-style error reporting API: to be used in this way:
>  *      ereport(ERROR,
>  *              errcode(ERRCODE_UNDEFINED_CURSOR),
>  *              errmsg("portal \"%s\" not found", stmt->portalname),
>  *              ... other errxxx() fields as needed ...);
>  *

Attached v18 patch has the changes for the same.

Regards,
Vignesh

Attachment

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Output clause for Upsert aka INSERT...ON CONFLICT
Next
From: Andres Freund
Date:
Subject: Re: Design of pg_stat_subscription_workers vs pgstats