]> granicus.if.org Git - postgresql/commit
Use standard interrupt handling in logical replication launcher.
authorAndres Freund <andres@anarazel.de>
Thu, 8 Jun 2017 22:00:53 +0000 (15:00 -0700)
committerAndres Freund <andres@anarazel.de>
Thu, 8 Jun 2017 22:38:50 +0000 (15:38 -0700)
commit2c48f5db64b1b999b08052115a5ce873343c372a
tree135bf4827ff26ca27680087da070fbc94e1f1e2c
parent5fd56b9f5b4a007a4122c313a184f78f1647c4ab
Use standard interrupt handling in logical replication launcher.

Previously the exit handling was only able to exit from within the
main loop, and not from within the backend code it calls.  Fix that by
using the standard die() SIGTERM handler, and adding the necessary
CHECK_FOR_INTERRUPTS() call.

This requires adding yet another process-type-specific branch to
ProcessInterrupts(), which hints that we probably should generalize
that handling.  But that's work for another day.

Author: Petr Jelinek
Reviewed-By: Andres Freund
Discussion: https://postgr.es/m/fe072153-babd-3b5d-8052-73527a6eb657@2ndquadrant.com
src/backend/replication/logical/launcher.c
src/backend/tcop/postgres.c
src/include/replication/logicallauncher.h