Use proc_exit() for walreceiver exit in WalRcvWaitForStartPosition() Previously, when the walreceiver exited from WalRcvWaitForStartPosition() at the startup process's request, it called exit(1) directly. This could skip cleanup performed by the callback functions.
This commit makes the walreceiver to use proc_exit() instead, ensuring normal cleanup is executed on exit. Also this commit updates comments describing walreceiver termination. Apply to master only, as this has not caused practical issues so far. Author: Chao Li <[email protected]> Reviewed-by: Fujii Masao <[email protected]> Reviewed-by: Andreas Karlsson <[email protected]> Reviewed-by: Xuneng Zhou <[email protected]> Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ee550254a29a4ccd3852f14b1806b8ffe26b7454 Modified Files -------------- src/backend/replication/walreceiver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
