From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Tim Kane <tim(dot)kane(at)gmail(dot)com> |
Cc: | Suzuki Hironobu <hironobu(at)interdb(dot)jp>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: psql client memory usage |
Date: | 2013-09-06 13:56:42 |
Message-ID: | CAHyXU0xkwzo3CK8rqUUwWHmwPr4aScsO=ZW3FPVg=rd074U8Yg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Sep 6, 2013 at 8:19 AM, Tim Kane <tim(dot)kane(at)gmail(dot)com> wrote:
> Ahh. All these years (albeit sporadic), I never knew about FETCH_COUNT.
> That makes sense. Thanks muchly.
Not your fault: FETCH_COUNT is a hack IMO. The real issue was that
libpq (until recently) forced the entire result into memory before it
was returned to the caller. We can now in libpq (thanks Marko) that
allows process rows as they come in. I expect soon psql will be
adjusted to utilize that new API (although exactly how is unclear);
runaway memory consumption in libpq/psql burns a *lot* of people.
I personally find cursors to be baroque and rarely use them except
internally inside pl/pgsql functions.
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Agustin Larreinegabe | 2013-09-06 14:17:25 | Re: PK referenced function |
Previous Message | Michael Paquier | 2013-09-06 13:51:08 | Re: PK referenced function |