pgsql: Allow DSM allocation to be interrupted.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow DSM allocation to be interrupted.
Date: 2018-09-18 11:52:56
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

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

Author: Chris Travers
Reviewed-by: Ildar Musin, Murat Kabilov, Oleksii Kliukin
Tested-by: Oleksii Kliukin



Modified Files
src/backend/storage/ipc/dsm_impl.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-09-18 14:45:09 Re: pgsql: Allow concurrent-safe open() and fopen() in frontend code for Wi
Previous Message Thomas Munro 2018-09-18 11:48:14 pgsql: Allow DSM allocation to be interrupted.