postgresql/src/backend
Robert Haas 13df76a537 Introduce dynamic shared memory areas.
Programmers discovered decades ago that it was useful to have a simple
interface for allocating and freeing memory, which is why malloc() and
free() were invented.  Unfortunately, those handy tools don't work
with dynamic shared memory segments because those are specific to
PostgreSQL and are not necessarily mapped at the same address in every
cooperating process.  So invent our own allocator instead.  This makes
it possible for processes cooperating as part of parallel query
execution to allocate and free chunks of memory without having to
reserve them prior to the start of execution.  It could also be used
for longer lived objects; for example, we could consider storing data
for pg_stat_statements or the stats collector in shared memory using
these interfaces, rather than writing them to files.  Basically,
anything that needs shared memory but can't predict in advance how
much it's going to need might find this useful.

Thomas Munro and Robert Haas.  The original code (of mine) on which
Thomas based his work was actually designed to be a new backend-local
memory allocator for PostgreSQL, but that hasn't gone anywhere - or
not yet, anyway.  Thomas took that work and performed major
refactoring and extensive modifications to make it work with dynamic
shared memory, including the addition of appropriate locking.

Discussion: CA+TgmobkeWptGwiNa+SGFWsTLzTzD-CeLz0KcE-y6LFgoUus4A@mail.gmail.com
Discussion: CAEepm=1z5WLuNoJ80PaCvz6EtG9dN0j-KuHcHtU6QEfcPP5-qA@mail.gmail.com
2016-12-02 12:34:36 -05:00
..
access Add max_parallel_workers GUC. 2016-12-02 07:42:58 -05:00
bootstrap Support condition variables. 2016-11-22 14:27:11 -05:00
catalog Fix test about ignoring extension dependencies during extension scripts. 2016-11-26 13:31:35 -05:00
commands Permit dump/reload of not-too-large >1GB tuples 2016-12-02 00:34:01 -03:00
executor User narrower representative tuples in the hash-agg hashtable. 2016-11-30 17:30:09 -08:00
foreign Remove GetUserMappingId() and GetUserMappingById(). 2016-07-22 11:32:23 -04:00
lib Permit dump/reload of not-too-large >1GB tuples 2016-12-02 00:34:01 -03:00
libpq Consistently mention 'SELECT pg_reload_conf()' in config files 2016-10-25 11:26:15 -04:00
main Remove barrier.h 2016-11-22 20:28:24 -05:00
nodes Implement syntax for transition tables in AFTER triggers. 2016-11-04 10:49:50 -05:00
optimizer Fix bogus handling of JOIN_UNIQUE_OUTER/INNER cases for parallel joins. 2016-11-29 19:32:35 -05:00
parser Add aggregate_with_argtypes and use it consistently 2016-12-01 17:38:49 -05:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Try to find out the actual hugepage size when making a MAP_HUGETLB request. 2016-10-13 15:06:46 -04:00
postmaster Add max_parallel_workers GUC. 2016-12-02 07:42:58 -05:00
regex Make locale-dependent regex character classes work for large char codes. 2016-09-05 17:06:29 -04:00
replication Fix outdated comments 2016-12-02 10:15:36 -03:00
rewrite Cleanup of rewriter and planner handling of Query.hasRowSecurity flag. 2016-11-10 16:16:33 -05:00
snowball Update copyright for 2016 2016-01-02 13:33:40 -05:00
storage Remove barrier.h 2016-11-22 20:28:24 -05:00
tcop Remove or reduce verbosity of some debug messages. 2016-11-17 17:05:16 -05:00
tsearch Add macros to make AllocSetContextCreate() calls simpler and safer. 2016-08-27 17:50:38 -04:00
utils Introduce dynamic shared memory areas. 2016-12-02 12:34:36 -05:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Straighten out some whitespace 2016-11-29 15:08:14 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00