Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Renaming MemoryContextResetAndDeleteChildren to MemoryContextReset
Date: 2015-02-26 22:41:09
Message-ID: 20150226224109.GK24199@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2015-02-26 22:42:09 Re: logical column ordering
Previous Message Tom Lane 2015-02-26 22:36:19 Re: logical column ordering