postgresql/src/backend
Tom Lane eaa5808e8e Redefine MemoryContextReset() as deleting, not resetting, child contexts.
That is, MemoryContextReset() now means what was formerly meant by
MemoryContextResetAndDeleteChildren(), and the latter is now just a macro
alias for the former.  If you really want the functionality that was
formerly provided by MemoryContextReset(), what you have to do is
MemoryContextResetChildren() plus MemoryContextResetOnly() (which is a
new API to reset *only* the named context and not touch its children).

The reason for this change is that near fifteen years of experience has
proven that there is noplace where old-style MemoryContextReset() is
actually what you want.  Making that the default behavior has led to lots
of context-leakage bugs, while we've not found anyplace where it's actually
necessary to keep the child contexts; at least the standard regression
tests do not reveal anyplace where this change breaks anything.  And there
are upcoming patches that will introduce additional reasons why child
contexts need to be removed.

We could change existing calls of MemoryContextResetAndDeleteChildren to be
just MemoryContextReset, but for the moment I'll leave them alone; they're
not costing anything.
2015-02-27 18:10:04 -05:00
..
access Reconsider when to wait for WAL flushes/syncrep during commit. 2015-02-26 12:50:07 +01:00
bootstrap Get rid of multiple applications of transformExpr() to the same tree. 2015-02-22 13:59:09 -05:00
catalog Allow forcing nullness of columns during bootstrap. 2015-02-21 22:31:54 +01:00
commands Make CREATE OR REPLACE VIEW internally more consistent 2015-02-27 19:19:34 -03:00
executor In array_agg(), don't create a new context for every group. 2015-02-21 17:24:48 -08:00
foreign Update copyright for 2015 2015-01-06 11:43:47 -05:00
lib Fix a bug in pairing heap removal code. 2015-02-17 22:55:53 +02:00
libpq Use FLEXIBLE_ARRAY_MEMBER in a number of other places. 2015-02-21 16:12:14 -05:00
main Don't require users of src/port/gettimeofday.c to initialize it. 2015-02-21 12:17:04 -05:00
nodes Add hasRowSecurity to copyfuncs/outfuncs 2015-02-25 23:35:04 -05:00
optimizer Add locking clause for SB views for update/delete 2015-02-25 21:36:29 -05:00
parser Improve parser's one-extra-token lookahead mechanism. 2015-02-24 17:53:45 -05:00
po Translation updates 2015-02-01 23:23:40 -05:00
port Remove the option to service interrupts during PGSemaphoreLock(). 2015-02-03 23:25:00 +01:00
postmaster Replace checkpoint_segments with min_wal_size and max_wal_size. 2015-02-23 18:53:02 +02:00
regex Replace a bunch more uses of strncpy() with safer coding. 2015-01-24 13:05:42 -05:00
replication Error when creating names too long for tar format 2015-02-24 13:41:07 -05:00
rewrite Add parse location fields to NullTest and BooleanTest structs. 2015-02-22 14:40:27 -05:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Guard against spurious signals in LockBufferForCleanup. 2015-02-23 16:14:14 +01:00
tcop Fix stupid merge errors in previous commit 2015-02-23 15:05:37 -03:00
tsearch Update copyright for 2015 2015-01-06 11:43:47 -05:00
utils Redefine MemoryContextReset() as deleting, not resetting, child contexts. 2015-02-27 18:10:04 -05:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Update copyright for 2015 2015-01-06 11:43:47 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Translation updates 2015-02-01 23:23:40 -05:00