pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Lee <ali@pivotal.io>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Taylor Vesely <tvesely@pivotal.io>
Cc: Melanie Plageman <mplageman@pivotal.io>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Memory-Bounded Hash Aggregation
Date: Tue, 4 Feb 2020 18:42:29 +0800
Message-ID: <20200204104229.GA58298@earth.local> (raw)
In-Reply-To: <8bf8d5f77db49cc1f032b6c7c0cfe0d6da89d64a.camel@j-davis.com>
References: <CAFaX_4Ls5UGQ2UDYkWhn2xFq=V6BKpUbKSQnWmy27VWhQ2=enA@mail.gmail.com>
	<e52707d4665e32867fb6dd181825ef15f853b8bf.camel@j-davis.com>
	<20191214173225.3kzsbncr6brpxdll@development>
	<d72e494db7b075ef02c3163e6614e698701d2c3e.camel@j-davis.com>
	<775d754c-9a61-5363-6998-f87d15f1b592@iki.fi>
	<e5566f7def33a9e9fdff337cca32d07155d7b635.camel@j-davis.com>
	<CAH2-WznXPuKOee6EMxc7jD4vSQv=yFVVTz6gridGkmzxTSkyNA@mail.gmail.com>
	<6e2b4a4475a690fa515829950aeed935696b0df3.camel@j-davis.com>
	<97c46a59c27f3c38e486ca170fcbc618d97ab049.camel@j-davis.com>
	<8bf8d5f77db49cc1f032b6c7c0cfe0d6da89d64a.camel@j-davis.com>

On Mon, Feb 03, 2020 at 06:24:14PM -0800, Jeff Davis wrote:
> On Mon, 2020-02-03 at 10:29 -0800, Jeff Davis wrote:
> > I ended up converting the freelist to a min heap.
> > 
> > Attached is a patch which makes three changes to better support
> > HashAgg:
> 
> And now I'm attaching another version of the main Hash Aggregation
> patch to be applied on top of the logtape.c patch.
> 
> Not a lot of changes from the last version; mostly some cleanup and
> rebasing. But it's faster now with the logtape.c changes.

Nice!

Just back from the holiday. I had the perf test with Tomas's script,
didn't notice the freelist sorting regression at that time.

The minheap looks good, have you tested the performance and aggregate
validation?

About the "Cap the size of the LogicalTapeSet's freelist" and "Don't
bother tracking free space for HashAgg at all" you mentioned in last
mail, I suppose these two options will lost the disk space saving
benefit since some blocks are not reusable then?

-- 
Adam Lee





view thread (81+ messages)  latest in thread

Message-ID: <20200204104229.GA58298@earth.local>
Permalink:  ../20200204104229.GA58298@earth.local/
Also on:    postgresql.org/message-id/20200204104229.GA58298@earth.local

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ali@pivotal.io, pgsql@j-davis.com, pg@bowt.ie, hlinnaka@iki.fi, tomas.vondra@2ndquadrant.com, tvesely@pivotal.io, mplageman@pivotal.io
  Subject: Re: Memory-Bounded Hash Aggregation
  In-Reply-To: <20200204104229.GA58298@earth.local>

* 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