Re: Performance tuning on RedHat Enterprise Linux 3 - Mailing list pgsql-general

From Neil Conway
Subject Re: Performance tuning on RedHat Enterprise Linux 3
Date
Msg-id 1102381333.1494.48.camel@localhost.localdomain
Whole thread Raw
In response to Re: Performance tuning on RedHat Enterprise Linux 3  (Paul Tillotson <pntil@shentel.net>)
Responses Re: Performance tuning on RedHat Enterprise Linux 3
List pgsql-general
On Mon, 2004-12-06 at 19:37 -0500, Paul Tillotson wrote:
> I seem to remember hearing that the memory limit on certain operations,
> such as sorts, is not "enforced" (may the hackers correct me if I am
> wrong); rather, the planner estimates how much a sort might take by
> looking at the statistics for a table.
>
> If the statistics are wrong, however, the sort doesn't actually stay
> within sort memory, and so the process consumes a very large amount of
> memory, much more than the sort_mem configuration parameter should allow
> it to.

AFAIK this is not the case. sort_mem defines the in-memory buffer used
_per_ sort operation. The problem you may be referring to is that
multiple concurrent sort operations (possibly within a single backend)
will each consume up to sort_mem, so the aggregate memory usage for sort
operations may be significantly higher than sort_mem.

-Neil



pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Network authentication
Next
From: Eric Davies
Date:
Subject: hooks for supporting third party blobs?