postgresql/src
Noah Misch 57ebbbb8f1 Avoid "could not reattach" by providing space for concurrent allocation.
We've long had reports of intermittent "could not reattach to shared
memory" errors on Windows.  Buildfarm member dory fails that way when
PGSharedMemoryReAttach() execution overlaps with creation of a thread
for the process's "default thread pool".  Fix that by providing a second
region to receive asynchronous allocations that would otherwise intrude
into UsedShmemSegAddr.  In pgwin32_ReserveSharedMemoryRegion(), stop
trying to free reservations landing at incorrect addresses; the caller's
next step has been to terminate the affected process.  Back-patch to 9.4
(all supported versions).

Reviewed by Tom Lane.  He also did much of the prerequisite research;
see commit bcbf2346d6.

Discussion: https://postgr.es/m/20190402135442.GA1173872@rfd.leadboat.com
2019-04-08 21:39:04 -07:00
..
backend Avoid "could not reattach" by providing space for concurrent allocation. 2019-04-08 21:39:04 -07:00
bin Have pg_upgrade's Makefile honor NO_TEMP_INSTALL 2019-03-31 08:22:04 -04:00
common Fix portability failure introduced in commits d2b0b60e7 et al. 2018-12-26 15:30:30 -05:00
fe_utils Fix translation of special characters in psql's LaTeX output modes. 2018-11-26 17:32:51 -05:00
include Avoid "could not reattach" by providing space for concurrent allocation. 2019-04-08 21:39:04 -07:00
interfaces Fix potential memory access violation in ecpg if filename of include file is 2019-03-11 16:26:59 +01:00
makefiles Handle USE_MODULE_DB for all tests able to use an installed postmaster. 2019-04-03 17:10:36 -07:00
pl Translation updates 2019-02-11 14:21:55 +01:00
port Fix error handling of readdir() port implementation on first file lookup 2019-03-04 09:50:14 +09:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Fix improper interaction of FULL JOINs with lateral references. 2019-04-08 16:09:07 -04:00
timezone Update time zone data files to tzdata release 2018i. 2019-02-05 10:59:23 -05:00
tools Revert "Consistently test for in-use shared memory." 2019-04-05 00:00:55 -07:00
tutorial Update copyright for 2016 2016-01-02 13:33:40 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Install TAP test infrastructure so it's available for extension testing. 2016-09-23 15:50:00 -04:00
Makefile.global.in Revert "Consistently test for in-use shared memory." 2019-04-05 00:00:55 -07:00
Makefile.shlib Ensure static libraries have correct mod time even if ranlib messes it up. 2018-11-29 15:53:44 -05:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00