From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
Cc: | 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera from 2ndQuadrant <alvherre(at)alvh(dot)no-ip(dot)org>, 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [bug fix] Produce a crash dump before main() on Windows |
Date: | 2019-09-11 02:57:29 |
Message-ID: | 20190911025729.GD1953@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 10, 2019 at 06:44:48AM +0000, Tsunakawa, Takayuki wrote:
> We don't have to call pgwin32_is_service() to determine whether we
> call SetErrorMode() in postmaster.c because:
>
> * The dialog box doesn't appear under Windows service, whether
> * PostgreSQL itself starts as a service or another (server)
> * application runs as a service and does "pg_ctl start."
>
> * It's OK for the dialog box to appear when the user runs "pg_ctl
> * start" on the command prompt. That usage is interactive, and
> * should not be for production use (postgres processes vanish when
> * the user mistakenly presses Ctrl+C, or closes the command prompt).
> * Even now, the dialog box pops up if postmaster crashes before
> * main().
Reading the thread again from scratch, I am under the impression that
we do not have an actual consensus on this patch :)
Doesn't your first bullet point actually contradict the second one?
Your second point looks sensible from a usage point of view (aka show
a box when pg_ctl start fails from the command prompt because somebody
typed the command manually), however I am really worried about the
first point. Imagine an application which relies on Postgres, still
does *not* start it as a service but uses "pg_ctl start"
automatically. This could be triggered as part of another service
startup which calls say system(), or as another script. Wouldn't that
cause potentially a freeze? I am also not sure that I quite
understand why a popup would never show up if a different service
startup triggers pg_ctl start by itself that fails.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-09-11 03:53:56 | Re: Change atoi to strtol in same place |
Previous Message | Tsunakawa, Takayuki | 2019-09-11 02:34:59 | RE: SIGQUIT on archiver child processes maybe not such a hot idea? |