worker_spi shouldn't execute again on sigterm

Поиск
Список
Период
Сортировка
От Jeremy Finzel
Тема worker_spi shouldn't execute again on sigterm
Дата
Msg-id CAMa1XUgOWqhUpHX_GKkM-YVoy6AOW0rPaRpYDbY01dyc6dtjPQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: worker_spi shouldn't execute again on sigterm  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
I noticed that the way the test module worker_spi is written, it will execute the main loop SQL one more time after it gets a sigterm, THEN exit 1.  This was surprising to me where I used this module as a pattern for my own background worker as I would have thought it should bail immediately without executing any more SQL.

Shouldn't we add something like this line before it enters the phase where it starts the transaction and executes the SQL?

                  /*
                 * In case of a SIGTERM, exit immediately
                 */
                if (got_sigterm)
                {
                        break;
                }

Please help me if I'm missing something.

Thanks,
Jeremy

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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: Re: Markdown format output for psql, design notes
Следующее
От: Evgeniy Efimkin
Дата:
Сообщение: Re: [WIP] CREATE SUBSCRIPTION with FOR TABLES clause (table filter)