From: | vignesh C <vignesh21(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Printing backtrace of postgres processes |
Date: | 2021-01-28 11:52:24 |
Message-ID: | CALDaNm1uWKn8KGD0q8HqCPhxSUDKWCEW55aidOiJwd+vfaB+gg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 27, 2021 at 10:40 PM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> Hi,
>
> On 2021-01-27 19:05:16 +0530, vignesh C wrote:
>
> > /*
> > + * LogBackTrace
> > + *
> > + * Get the backtrace and log the backtrace to log file.
> > + */
> > +void
> > +LogBackTrace(void)
> > +{
> > + int save_errno = errno;
> > +
> > + void *buf[100];
> > + int nframes;
> > + char **strfrms;
> > + StringInfoData errtrace;
> > +
> > + /* OK to process messages. Reset the flag saying there are more to do. */
> > + PrintBacktracePending = false;
>
> ISTM that it'd be better to do this in the caller, allowing this
> function to be used outside of signal triggered backtraces.
>
> >
> > +extern void LogBackTrace(void); /* Called from EmitProcSignalPrintCallStack */
>
> I don't think this comment is correct anymore?
Thanks for the comments, I have fixed and attached an updated patch
with the fixes for the same.
Thoughts?
Regards,
Vignesh
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Print-backtrace-of-postgres-process-that-are-part.patch | text/x-patch | 18.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amul Sul | 2021-01-28 12:16:28 | Re: [Patch] ALTER SYSTEM READ ONLY |
Previous Message | Alexey Kondratov | 2021-01-28 11:42:40 | Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly |