pgsql: Use WaitEventSet API for postmaster's event loop.

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема pgsql: Use WaitEventSet API for postmaster's event loop.
Дата
Msg-id E1pFoVu-003E30-9H@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Use WaitEventSet API for postmaster's event loop.

Switch to a design similar to regular backends, instead of the previous
arrangement where signal handlers did non-trivial state management and
called fork().  The main changes are:

* The postmaster now has its own local latch to wait on.  (For now, we
  don't want other backends setting its latch directly, but that could
  probably be made to work with more research on robustness.)

* The existing signal handlers are cut in two: a handle_pm_XXX() part
  that just sets pending_pm_XXX flags and the latch, and a
  process_pm_XXX() part that runs later when the latch is seen.

* Signal handlers are now installed with the regular pqsignal()
  function rather than the special pqsignal_pm() function; historical
  portability concerns about the effect of SA_RESTART on select() are no
  longer relevant, and we don't need to block signals anymore.

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA%2BhUKG%2BZ-HpOj1JsO9eWUP%2Bar7npSVinsC_npxSy%2BjdOMsx%3DGg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7389aad63666a2cac18cd6d7496378d7f50ef37b

Modified Files
--------------
src/backend/libpq/pqcomm.c            |   3 +-
src/backend/libpq/pqsignal.c          |  40 ----
src/backend/postmaster/fork_process.c |  18 +-
src/backend/postmaster/postmaster.c   | 418 ++++++++++++++++++++--------------
src/backend/tcop/postgres.c           |   1 -
src/backend/utils/init/miscinit.c     |  13 +-
src/include/libpq/pqsignal.h          |   3 -
src/include/miscadmin.h               |   1 +
8 files changed, 269 insertions(+), 228 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Doc: fix silly thinko in 8bf6ec3ba.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Revert "Get rid of the "new" and "old" entries in a view's range