Re: [GENERAL] How does Postgres estimate the memory needed forsorting/aggregating - Mailing list pgsql-general

From John R Pierce
Subject Re: [GENERAL] How does Postgres estimate the memory needed forsorting/aggregating
Date
Msg-id 5610e7aa-c7c9-0db2-0c37-527920046810@hogranch.com
Whole thread Raw
In response to [GENERAL] How does Postgres estimate the memory needed for sorting/aggregating  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: [GENERAL] How does Postgres estimate the memory needed forsorting/aggregating  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-general
On 1/25/2017 12:59 PM, Thomas Kellerer wrote:
> So here is my question: how does Postgres estimate/know the memory
> needed for the aggregation? Or does it dynamically resize the memory
> if the initial assumption was wrong?

my understanding is it fits as much as it can into a work_mem sized
allocation, and if thats not enough uses temporary files and multiple
passes.


--
john r pierce, recycling bits in santa cruz



pgsql-general by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [GENERAL] How does Postgres estimate the memory needed forsorting/aggregating
Next
From: Thomas Kellerer
Date:
Subject: [GENERAL] Re: How does Postgres estimate the memory needed forsorting/aggregating