]> granicus.if.org Git - postgresql/commit
Allow DSM allocation to be interrupted.
authorThomas Munro <tmunro@postgresql.org>
Tue, 18 Sep 2018 10:56:36 +0000 (22:56 +1200)
committerThomas Munro <tmunro@postgresql.org>
Tue, 18 Sep 2018 11:19:22 +0000 (23:19 +1200)
commitfb389498be5c2cb4c694dfe347f6736fda0960aa
tree43008d1b7ef9ec0b364a614c623fbd91097c0776
parent9b14bbd52c8caf5ac92b0e8088684fc72f070c33
Allow DSM allocation to be interrupted.

Chris Travers reported that the startup process can repeatedly try to
cancel a backend that is in a posix_fallocate()/EINTR loop and cause it
to loop forever.  Teach the retry loop to give up if an interrupt is
pending.  Don't actually check for interrupts in that loop though,
because a non-local exit would skip some clean-up code in the caller.

Back-patch to 9.4 where DSM was added (and posix_fallocate() was later
back-patched).

Author: Chris Travers
Reviewed-by: Ildar Musin, Murat Kabilov, Oleksii Kliukin
Tested-by: Oleksii Kliukin
Discussion: https://postgr.es/m/CAN-RpxB-oeZve_J3SM_6%3DHXPmvEG%3DHX%2B9V9pi8g2YR7YW0rBBg%40mail.gmail.com
src/backend/storage/ipc/dsm_impl.c