From: | George Neuner <gneuner2(at)comcast(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Postgres goes to auto recovery mode after system restart(check this draft) |
Date: | 2017-03-20 16:08:59 |
Message-ID: | qgtvccpfr4usu0vnj934c2o3jim0oe335s@4ax.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 20 Mar 2017 12:05:01 +0100, Karsten Hilbert
<Karsten(dot)Hilbert(at)gmx(dot)net> wrote:
>On Mon, Mar 20, 2017 at 06:48:36AM -0400, George Neuner wrote:
>
>> Windows informs all processes that it is shutting down (or entering
>> sleep, or waking up, etc.), but the notifications take different forms
>> depending on whether the process is a service or a normal application.
>> Services receive commands from the service manager, whereas
>> applications receive environment control messages sent to their main
>> window.
>>
>> pg_ctl is a command-line program that can run as a service. But since
>> it creates no window, when run as an application it cannot receive any
>> environment messages.
>
>Would it make sense to have pg_ctl create a non-visible
>window when run as an application in order to receive
>environment control messages ?
>
> http://stackoverflow.com/questions/2122506/how-to-create-a-hidden-window-in-c
>
>Just wondering,
>Karsten
I'm afraid I have to agree with Tom.
That stackoverflow page is a bit misleading as the examples presume
MFC and wizard generated message maps. I have no idea whether pg_ctl
currently even uses MFC.
Creating a window and message loop in pure C is a good page of code.
Not a lot, to be sure, but it would add a whole new mode of operation
because handling ordinary (window) messages is different from handling
service control messages.
George
From | Date | Subject | |
---|---|---|---|
Next Message | Ben Chobot | 2017-03-20 16:45:25 | Re: Google Cloud Platform, snapshots and WAL |
Previous Message | Steve Crawford | 2017-03-20 15:57:30 | Re: CenOS 5/Postgresql 9.6 |