Re: "wal receiver" process hang in syslog() while exiting afterreceiving SIGTERM while the postgres has been promoted.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: "wal receiver" process hang in syslog() while exiting afterreceiving SIGTERM while the postgres has been promoted.
Дата
Msg-id CA+TgmoaCgbsKcbwojUv7S1uSAvV1G5atrXCbsY3DPSygjsg7Cg@mail.gmail.com
обсуждение исходный текст
Ответ на RE: "wal receiver" process hang in syslog() while exiting afterreceiving SIGTERM while the postgres has been promoted.  ("Chen, Yan-Jack (NSB - CN/Hangzhou)" <yan-jack.chen@nokia-sbell.com>)
Ответы RE: "wal receiver" process hang in syslog() while exiting afterreceiving SIGTERM while the postgres has been promoted.  ("Chen, Yan-Jack (NSB - CN/Hangzhou)" <yan-jack.chen@nokia-sbell.com>)
Список pgsql-hackers
On Tue, Jun 26, 2018 at 4:12 AM, Chen, Yan-Jack (NSB - CN/Hangzhou)
<yan-jack.chen@nokia-sbell.com> wrote:
> Hi,
>   Well, if you agree with do not write log in signal handling function in any circumstance

I don't understand this sentence.

> I see in many cases in postgresql signal handling function just set one flag which triggers its main process to
handlingthe progress.
 

Right, that's a good way to do it.

>   How about simply remove the code lines?
>
> --- walreceiver_old.c
> +++ walreceiver.c
> @@ -816,10 +816,6 @@
>
>         SetLatch(&WalRcv->latch);
>
> -       /* Don't joggle the elbow of proc_exit */
> -       if (!proc_exit_inprogress && WalRcvImmediateInterruptOK)
> -               ProcessWalRcvInterrupts();
> -
>         errno = save_errno;
>  }

Hmm, I doubt it's that simple but I haven't studied this.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Unexpected behavior of DROP VIEW/TABLE IF EXISTS
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Small fixes about backup history file in doc and pg_standby