pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Memory Accounting
Date: Mon, 22 Jul 2019 09:33:03 -0700
Message-ID: <176131d7f021b58cb1421ccdde4d192f7703e9ce.camel@j-davis.com> (raw)
In-Reply-To: <20190722161658.ryo6lbgead2tijew@development>
References: <027a129b8525601c6a680d27ce3a7172dab61aab.camel@j-davis.com>
	<8456dbe6-2245-6a6d-03af-bb62d1615782@iki.fi>
	<20190722161658.ryo6lbgead2tijew@development>

On Mon, 2019-07-22 at 18:16 +0200, Tomas Vondra wrote:
> * I changed it to only update mem_allocated for the current
> > > context,
> > > not recursively for all parent contexts. It's now up to the
> > > function
> > > that reports memory usage to recurse or not (as needed).
> > 
> > Is that OK for memory bounded hash aggregation? Might there be a
> > lot 
> > of sub-contexts during hash aggregation?
> > 
> 
> There shouldn't be, at least not since b419865a814abbc. There might
> be
> cases where custom aggregates still do that, but I think that's
> simply a
> design we should discourage.

Right, I don't think memory-context-per-group is something we should
optimize for.

Discussion:
https://www.postgresql.org/message-id/3839201.Nfa2RvcheX%40techfox.foxi
https://www.postgresql.org/message-id/5334D7A5.2000907%40fuzzy.cz

Commit link:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=b419865a814abbca12bdd6eef6a3d5ed67f43...

Regards,
	Jeff Davis







view thread (28+ messages)  latest in thread

Message-ID: <176131d7f021b58cb1421ccdde4d192f7703e9ce.camel@j-davis.com>
Permalink:  ../176131d7f021b58cb1421ccdde4d192f7703e9ce.camel@j-davis.com/
Also on:    postgresql.org/message-id/176131d7f021b58cb1421ccdde4d192f7703e9ce.camel@j-davis.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: pgsql@j-davis.com, tomas.vondra@2ndquadrant.com, hlinnaka@iki.fi
  Subject: Re: Memory Accounting
  In-Reply-To: <176131d7f021b58cb1421ccdde4d192f7703e9ce.camel@j-davis.com>
  References: <027a129b8525601c6a680d27ce3a7172dab61aab.camel@j-davis.com> <8456dbe6-2245-6a6d-03af-bb62d1615782@iki.fi> <20190722161658.ryo6lbgead2tijew@development> <176131d7f021b58cb1421ccdde4d192f7703e9ce.camel@j-davis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox