Re: [bug fix] Produce a crash dump before main() on Windows

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com
Cc: amit(dot)kapila16(at)gmail(dot)com, kommi(dot)haribabu(at)gmail(dot)com, michael(at)paquier(dot)xyz, robertmhaas(at)gmail(dot)com, craig(at)2ndquadrant(dot)com, magnus(at)hagander(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [bug fix] Produce a crash dump before main() on Windows
Date: 2019-07-23 11:45:46
Message-ID: 20190723.204546.64169033.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Mon, 1 Jul 2019 00:04:47 +0000, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> wrote in <0A3221C70F24FB45833433255569204D1FC6515F(at)G01JPEXMBYT05>
> From: Amit Kapila [mailto:amit(dot)kapila16(at)gmail(dot)com]
> > Tsunakawa/Haribabu - By reading this thread briefly, it seems we need
> > some more inputs from other developers on whether to fix this or not,
> > so ideally the status of this patch should be 'Needs Review'. Why it
> > is in 'Waiting on Author' state? If something is required from
> > Author, then do we expect to see the updated patch in the next few
> > days?
>
> Thank you for paying attention to this. I think the patch is good, but someone else may have a different solution. So I marked it as needs review.

We are obliged to assume that we won't have the desired behavior
without detecting whether running as a service or not.

My investigation convinced me that there is no way for a process
to detect wheter it is running as a service (except the process
directly called from system (aka entry function)). In other
words, only pg_ctl knows that and other processes doesn't have a
clue for that. The processes other than postmaster can receive
that information via backend variables. But the postmaster has no
way to get the information from pg_ctl other than command line
parameter, environment variable or filesystem (or PIPE?).

If we see the complexity meets the benefit, we can use, say,
command line parameter, WER dialog can be shown when server is
started in console but the parameter being specified, but I don't
think it is a problem.

Thoughts?

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-07-23 11:58:56 Re: SegFault on 9.6.14
Previous Message Anastasia Lubennikova 2019-07-23 11:36:23 Re: Optimze usage of immutable functions as relation