Re: swap storm created by 8.2.3 - Mailing list pgsql-general

From Richard Huxton
Subject Re: swap storm created by 8.2.3
Date
Msg-id 465332BC.3070605@archonet.com
Whole thread Raw
In response to swap storm created by 8.2.3  (Joseph Shraibman <jks@selectacast.net>)
Responses Re: swap storm created by 8.2.3
List pgsql-general
Joseph Shraibman wrote:
> I'm running:
>
> PostgreSQL 8.2.3 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC)
> 3.4.6 20060404 (Red Hat 3.4.6-3)
>
> My memory settings are:
>
> work_mem = 64MB
> shared_buffers = 128MB
> temp_buffers = 32MB
>
> I ran a query that was "SELECT field, count(*) INTO TEMP temptable" and
> it grew to be 10gig (as reported by top)

What was the real query?
How many rows are we talking about?

 > and brought the whole machine
> to its knees.  How do I keep this from happening again?

Set your per-user limits (man ulimit or man bash) to restrict PG's
overall memory consumption.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Permance issues with migrated db
Next
From: Ron Johnson
Date:
Subject: Re: How to move tables in another physial place