postgresql/src/backend/postmaster
Tom Lane 59892b1209 On Windows, retry process creation if we fail to reserve shared memory.
We've heard occasional reports of backend launch failing because
pgwin32_ReserveSharedMemoryRegion() fails, indicating that something
has already used that address space in the child process.  It's not
very clear what, given that we disable ASLR in Windows builds, but
suspicion falls on antivirus products.  It'd be better if we didn't
have to disable ASLR, anyway.  So let's try to ameliorate the problem
by retrying the process launch after such a failure, up to 100 times.

Patch by me, based on previous work by Amit Kapila and others.
This is a longstanding issue, so back-patch to all supported branches.

Discussion: https://postgr.es/m/CAA4eK1+R6hSx6t_yvwtx+NRzneVp+MRqXAdGJZChcau8Uij-8g@mail.gmail.com
2017-07-10 11:00:09 -04:00
..
autovacuum.c Avoid useless respawining the autovacuum launcher at high speed. 2017-01-20 16:18:55 -05:00
bgwriter.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
checkpointer.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
fork_process.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
Makefile Refactor xlog.c to create src/backend/postmaster/startup.c 2011-11-02 14:25:01 +00:00
pgarch.c Avoid unlikely data-loss scenarios due to rename() without fsync. 2016-03-09 18:53:54 -08:00
pgstat.c Ignore old stats file timestamps when starting the stats collector. 2017-06-26 16:17:06 -04:00
postmaster.c On Windows, retry process creation if we fail to reserve shared memory. 2017-07-10 11:00:09 -04:00
startup.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
syslogger.c Fix unportable setvbuf() usage in initdb. 2014-05-15 15:57:57 -04:00
walwriter.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00