postgresql/src
Noah Misch 617dc6d299 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:00 -07:00
..
backend Avoid "could not reattach" by providing space for concurrent allocation. 2019-04-08 21:39:00 -07:00
bin Add vacuum_truncate reloption. 2019-04-08 16:43:57 +09:00
common Add support for partial TOAST decompression 2019-04-02 12:35:32 -04:00
fe_utils Ensure consistent name matching behavior in processSQLNamePattern(). 2019-04-05 12:59:57 -04:00
include Avoid "could not reattach" by providing space for concurrent allocation. 2019-04-08 21:39:00 -07:00
interfaces Add support TCP user timeout in libpq and the backend server 2019-04-06 15:23:37 +09:00
makefiles Handle USE_MODULE_DB for all tests able to use an installed postmaster. 2019-04-03 17:06:01 -07:00
pl Generated columns 2019-03-30 08:15:57 +01:00
port Assert that pgwin32_signal_initialize() has been called early enough. 2019-04-03 17:11:16 -07: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:26 -04:00
timezone More unconstify use 2019-02-13 11:50:16 +01:00
tools Revert "Consistently test for in-use shared memory." 2019-04-05 00:00:52 -07:00
tutorial SQL comment: remove extra word in heading comment 2019-01-25 18:57:21 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02: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 Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Revert "Consistently test for in-use shared memory." 2019-04-05 00:00:52 -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 Unified logging system for command-line programs 2019-04-01 20:01:35 +02:00