summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorAndres Freund2021-08-13 12:49:26 +0000
committerAndres Freund2021-08-13 12:49:26 +0000
commit80a8f95b3bca6a80672d1766c928cda34e979112 (patch)
treec5a49008f7f0f3ed485586bbce3526b50e17bbdd /src/include
parent1d5135f0043b32a7d9fdc66a9553c2078900e240 (diff)
Remove support for background workers without BGWORKER_SHMEM_ACCESS.
Background workers without shared memory access have been broken on EXEC_BACKEND / windows builds since shortly after background workers have been introduced, without that being reported. Clearly they are not commonly used. The problem is that bgworker startup requires to be attached to shared memory in EXEC_BACKEND child processes. StartBackgroundWorker() detaches from shared memory for unconnected workers, but at that point we already have initialized subsystems referencing shared memory. Fixing this problem is not entirely trivial, so removing the option to not be connected to shared memory seems the best way forward. In most use cases the advantages of being connected to shared memory far outweigh the disadvantages. As there have been no reports about this issue so far, we have decided that it is not worth trying to address the problem in the back branches. Per discussion with Alvaro Herrera, Robert Haas and Tom Lane. Author: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/20210802065116.j763tz3vz4egqy3w@alap3.anarazel.de
Diffstat (limited to 'src/include')
-rw-r--r--src/include/postmaster/bgworker.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/postmaster/bgworker.h b/src/include/postmaster/bgworker.h
index 8e9ef7c7bfa..6d4122b4c7e 100644
--- a/src/include/postmaster/bgworker.h
+++ b/src/include/postmaster/bgworker.h
@@ -48,6 +48,7 @@
/*
* Pass this flag to have your worker be able to connect to shared memory.
+ * This flag is required.
*/
#define BGWORKER_SHMEM_ACCESS 0x0001