Re: Would like to know how analyze works technically - Mailing list pgsql-general

From Tom Lane
Subject Re: Would like to know how analyze works technically
Date
Msg-id 998.1427861834@sss.pgh.pa.us
Whole thread Raw
In response to Would like to know how analyze works technically  (TonyS <tony@exquisiteimages.com>)
Responses Re: Would like to know how analyze works technically
List pgsql-general
TonyS <tony@exquisiteimages.com> writes:
> Running "analyze verbose;" and watching top, the system starts out using no
> swap data and about 4GB of cached memory and about 1GB of used memory. As it
> runs, the amount of used RAM climbs, and eventually the used swap memory
> increases to 100% and after being at that level for a couple of minutes, the
> analyze function crashes and indicates "server closed the connection
> unexpectedly."

ANALYZE is supposed to work in a constrained amount of memory, though
that amount depends quite a bit on what the data is and what you've
got the statistics target set to.

We've heard reports that there are memory leaks in (some versions of?)
PostGIS's analyze support.  Whether that would apply to you would depend
on whether you're using PostGIS.

Hard to say more without a lot more concrete info about what your
data is, what PG version you're using, etc.

            regards, tom lane


pgsql-general by date:

Previous
From: Joshua Ma
Date:
Subject: Re: Why does CREATE INDEX CONCURRENTLY need two scans?
Next
From: Timothy Garnett
Date:
Subject: Creating a non-strict custom aggregate that initializes to the first value