Re: [GENERAL] Postgres goes to auto recovery mode after system restart(check this draft)

Поиск
Список
Период
Сортировка
От George Neuner
Тема Re: [GENERAL] Postgres goes to auto recovery mode after system restart(check this draft)
Дата
Msg-id qgtvccpfr4usu0vnj934c2o3jim0oe335s@4ax.com
обсуждение исходный текст
Ответ на [GENERAL] Postgres goes to auto recovery mode after system restart(check thisdraft)  (Manojkumar S <manojkumar.krishnamurthy@zohocorp.com>)
Список pgsql-general
On Mon, 20 Mar 2017 12:05:01 +0100, Karsten Hilbert
<Karsten.Hilbert@gmx.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: [GENERAL] CenOS 5/Postgresql 9.6
Следующее
От: Ben Chobot
Дата:
Сообщение: Re: [GENERAL] Google Cloud Platform, snapshots and WAL