Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset
Date
Msg-id 20150226224109.GK24199@awork2.anarazel.de
Whole thread Raw
In response to Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2015-02-26 23:31:16 +0100, Andres Freund wrote:
> Without a compiler erroring out people won't notice that suddenly
> MemoryContextReset deletes much more; leading to possibly hard to find
> errors. Context resets frequently are in error paths, and those won't
> necessarily be hit when running with assertions enabled.

I'd really not even be surprised if a committer backpatches a
MemoryContextReset() addition, not realizing it behaves differently in
the back branches.

How about MemoryContextReset(bool reset_children)?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: logical column ordering
Next
From: Kevin Grittner
Date:
Subject: Re: logical column ordering