postgresql/src/backend/commands
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
..
Makefile Add a materialized view relations. 2013-03-03 18:23:31 -06:00
aggregatecmds.c Allow aggregates to provide estimates of their transition state data size. 2013-11-16 16:03:40 -05:00
alter.c Don't pass oidvector by value. 2013-06-12 19:50:37 -04:00
analyze.c Adjust HeapTupleSatisfies* routines to take a HeapTuple. 2013-07-22 13:38:44 -04:00
async.c Allow on-detach callbacks for dynamic shared memory segments. 2013-12-18 13:09:09 -05:00
cluster.c Fix full-table-vacuum request mechanism for MultiXactIds 2013-11-29 21:47:13 -03:00
collationcmds.c Refactor ALTER some-obj RENAME implementation 2013-01-21 12:06:41 -03:00
comment.c Update messages, comments and documentation for materialized views. 2013-07-05 15:37:51 -04:00
constraint.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
conversioncmds.c Refactor ALTER some-obj RENAME implementation 2013-01-21 12:06:41 -03:00
copy.c Comment: COPY comment improvement 2013-12-17 12:51:16 -05:00
createas.c Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00
dbcommands.c Rename various "freeze multixact" variables 2013-09-16 15:47:31 -03:00
define.c Allow aggregates to provide estimates of their transition state data size. 2013-11-16 16:03:40 -05:00
discard.c Add DISCARD SEQUENCES command. 2013-10-03 16:23:31 -04:00
dropcmds.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
event_trigger.c Don't use ordinary NULL-terminated strings as Name datums. 2013-06-12 19:49:50 -04:00
explain.c Improve EXPLAIN to print the grouping columns in Agg and Group nodes. 2013-12-12 11:24:38 -05:00
extension.c Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
foreigncmds.c Improve documentation about usage of FDW validator functions. 2013-10-28 10:28:35 -04:00
functioncmds.c Allow aggregate functions to be VARIADIC. 2013-09-03 17:08:46 -04:00
indexcmds.c Refine our definition of what constitutes a system relation. 2013-11-28 20:57:20 -05:00
lockcmds.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
matview.c Keep heap open until new heap generated in RMV. 2013-11-06 12:27:52 -06:00
opclasscmds.c Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
operatorcmds.c pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
portalcmds.c Only install a portal's ResourceOwner if it actually has one. 2013-06-13 13:12:49 -04:00
prepare.c Clean up the mess around EXPLAIN and materialized views. 2013-04-12 19:25:31 -04:00
proclang.c Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
schemacmds.c Editorialize a bit on new ProcessUtility() API. 2013-04-28 00:18:45 -04:00
seclabel.c Update messages, comments and documentation for materialized views. 2013-07-05 15:37:51 -04:00
sequence.c Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00
tablecmds.c Add a new reloption, user_catalog_table. 2013-12-10 19:17:34 -05:00
tablespace.c Add use of asprintf() 2013-10-13 00:09:18 -04:00
trigger.c Add new wal_level, logical, sufficient for logical decoding. 2013-12-10 19:01:40 -05:00
tsearchcmds.c Use appendStringInfoString instead of appendStringInfo where possible. 2013-10-31 10:55:59 -04:00
typecmds.c Update messages, comments and documentation for materialized views. 2013-07-05 15:37:51 -04:00
user.c Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
vacuum.c Fix more instances of "the the" in comments. 2013-12-13 20:02:01 +02:00
vacuumlazy.c Rework tuple freezing protocol 2013-12-16 11:29:50 -03:00
variable.c Remove CTimeZone/HasCTZSet, root and branch. 2013-11-01 13:57:31 -04:00
view.c Support multi-argument UNNEST(), and TABLE() syntax for multiple functions. 2013-11-21 19:37:20 -05:00