Re: psql client memory usage - Mailing list pgsql-general

From Suzuki Hironobu
Subject Re: psql client memory usage
Date
Msg-id 5229D467.8010205@interdb.jp
Whole thread Raw
In response to psql client memory usage  (Tim Kane <tim.kane@gmail.com>)
Responses Re: psql client memory usage  (Tim Kane <tim.kane@gmail.com>)
List pgsql-general
(13/09/06 21:06), Tim Kane wrote:
> Hi all,
>
> I have a fairly simple query, running on a particularly large table.  For
> illustration:
>
> echo "select * from really_big_table;" | psql my_database > /dev/null
>
>
> When I monitor the memory usage of the psql session, it continually grows.
> In fact, for this particularly large table ­ it grows to the point of
> consuming all swap, before the OOM killer takes steps to resolve it.
> Clearly, this isn't what I'd like to happen.
>
>
> My settings are:
> Postgresql 9.1.9
> work_mem = 256MB
> effective_cache_size = 12GB
> shared_buffers = 6GB
>
> I have 24GB physical ram to play with.
>

This is a client side problem (not server size).
See the description of FETCH_COUNT, please.
http://www.postgresql.org/docs/9.2/static/app-psql.html


echo "select * from really_big_table;" | psql --variable=FETCH_COUNT=100
my_database > /dev/null


Regards,





pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Old record migration to another table made the db slower
Next
From: Michael Paquier
Date:
Subject: Re: How to check if any WAL file is missing in archive folder