Re: Printing backtrace of postgres processes

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Printing backtrace of postgres processes
Date: 2022-01-27 05:14:54
Message-ID: CALDaNm1K8wAQ-zTmbyVuHXJszgKfUQh6tGrdfDuWm2Fe=jfobQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 26, 2022 at 11:07 AM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Tue, Jan 25, 2022 at 12:00 PM vignesh C <vignesh21(at)gmail(dot)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 Content-Type Size
v18-0001-Add-function-to-log-the-backtrace-of-the-specifi.patch text/x-patch 30.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-01-27 05:46:06 Re: Design of pg_stat_subscription_workers vs pgstats
Previous Message David G. Johnston 2022-01-27 05:07:54 Re: Output clause for Upsert aka INSERT...ON CONFLICT