postgresql/src/include
Robert Haas 001a573a20 Allow on-detach callbacks for dynamic shared memory segments.
Just as backends must clean up their shared memory state (releasing
lwlocks, buffer pins, etc.) before exiting, they must also perform
any similar cleanups related to dynamic shared memory segments they
have mapped before unmapping those segments.  So add a mechanism to
ensure that.

Existing on_shmem_exit hooks include both "user level" cleanup such
as transaction abort and removal of leftover temporary relations and
also "low level" cleanup that forcibly released leftover shared
memory resources.  On-detach callbacks should run after the first
group but before the second group, so create a new before_shmem_exit
function for registering the early callbacks and keep on_shmem_exit
for the regular callbacks.  (An earlier draft of this patch added an
additional argument to on_shmem_exit, but that had a much larger
footprint and probably a substantially higher risk of breaking third
party code for no real gain.)

Patch by me, reviewed by KaiGai Kohei and Andres Freund.
2013-12-18 13:09:09 -05:00
..
access Don't ignore tuple locks propagated by our updates 2013-12-18 13:45:51 -03:00
bootstrap Update copyrights for 2013 2013-01-01 17:15:01 -05:00
catalog Add GUC to enable WAL-logging of hint bits, even with checksums disabled. 2013-12-13 16:26:14 +02:00
commands Fix full-table-vacuum request mechanism for MultiXactIds 2013-11-29 21:47:13 -03:00
common Replace pg_asprintf() with psprintf(). 2013-10-22 19:40:26 -04:00
datatype Update copyrights for 2013 2013-01-01 17:15:01 -05:00
executor Prevent leakage of SPI tuple tables during subtransaction abort. 2013-07-25 16:46:14 -04:00
foreign Improve updatability checking for views and foreign tables. 2013-06-12 17:53:33 -04:00
lib Use improved vsnprintf calling logic in more places. 2013-10-24 21:43:57 -04:00
libpq Add large object functions catering to SQL callers. 2013-10-27 22:56:54 -04:00
mb Renovate display of non-ASCII messages on Windows. 2013-06-26 11:17:33 -04:00
nodes Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09:00
optimizer Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00
parser Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00
port Get rid of use of asprintf() in favor of a more portable implementation. 2013-10-22 18:42:13 -04:00
portability Allow dynamic allocation of shared memory segments. 2013-10-09 21:05:02 -04:00
postmaster New autovacuum_work_mem parameter 2013-12-12 11:42:39 +00:00
regex Fix old typo in comment. 2013-10-29 15:34:18 -04:00
replication pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
rewrite Allow only some columns of a view to be auto-updateable. 2013-10-18 10:35:36 -04:00
snowball Update copyrights for 2013 2013-01-01 17:15:01 -05:00
storage Allow on-detach callbacks for dynamic shared memory segments. 2013-12-18 13:09:09 -05:00
tcop pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
tsearch Update copyrights for 2013 2013-01-01 17:15:01 -05:00
utils Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Remove use of obsolescent Autoconf macros 2013-11-30 09:17:08 -05:00
fmgr.h Add infrastructure for storing a VARIADIC ANY function's VARIADIC flag. 2013-01-21 20:26:15 -05:00
funcapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getaddrinfo.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
getopt_long.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
miscadmin.h Remove CTimeZone/HasCTZSet, root and branch. 2013-11-01 13:57:31 -04:00
pg_config.h.in Remove use of obsolescent Autoconf macros 2013-11-30 09:17:08 -05:00
pg_config.h.win32 Remove use of obsolescent Autoconf macros 2013-11-30 09:17:08 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Add ALTER SYSTEM command to edit the server configuration file. 2013-12-18 23:42:44 +09:00
pg_trace.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
pgstat.h Split pgstat file in smaller pieces 2013-02-18 18:12:52 -03:00
pgtar.h Move tar function headers to pgtar.h 2013-01-02 20:34:08 +01:00
pgtime.h Fix some odd behaviors when using a SQL-style simple GMT offset timezone. 2013-11-01 12:13:18 -04:00
port.h Fix incorrect error message reported for non-existent users 2013-12-18 12:16:21 -05:00
postgres.h Add comment for VARSIZE_ANY_EXHDR macro 2013-09-10 20:18:53 -04:00
postgres_ext.h Provide database object names as separate fields in error messages. 2013-01-29 17:08:26 -05:00
postgres_fe.h Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
rusagestub.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
windowapi.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00