Re: [GENERAL] memory

From: Maarten Boekhold <maarten(dot)boekhold(at)tibcofinance(dot)com>
To: John Henderson <jrh(at)is(dot)com(dot)fj>
Cc: pgsql-general(at)hub(dot)org
Subject: Re: [GENERAL] memory
Date: 1999-12-01 14:58:29
Message-ID: 38453795.BB81DA89@tibcofinance.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> isfiji=> explain select * from sessions;
> NOTICE: QUERY PLAN:
> Seq Scan on sessions (cost=21330.73 size=371719 width=138)
> EXPLAIN
>
> The query above can access over 250M of memory according to top but dies
> with either a seg fault or the latest, something called
> "calloc: Cannot allocate memory"

I'm not sure, but my guess is: the BE needs to allocate data for over 74
megs (your table data), probably more due to formatting and page alignment
losses. Then it's sending it over either a TCP/IP connection or a UNIX
domain socket, probably another 74 megs to be allocated somewhere in
memory(?) and finally it gets to psql which needs to get yet another 74
megs.

Does this make any sense to the experts?

Maarten

--

Maarten Boekhold, maarten(dot)boekhold(at)tibcofinance(dot)com
TIBCO Finance Technology Inc.
"Sevilla" Building
Entrada 308
1096 ED Amsterdam, The Netherlands
tel: +31 20 6601000 (direct: +31 20 6601066)
fax: +31 20 6601005
http://www.tibcofinance.com

In response to

  • memory at 1999-11-30 00:00:46 from John Henderson

Browse pgsql-general by date

  From Date Subject
Next Message Massimo Pichini 1999-12-01 14:58:49 postgres libpq library
Previous Message Massimo Pichini 1999-12-01 14:24:22 Is the postgres libpq library thread safe ?