Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT

From: Abhijit Menon-Sen <ams(at)toroid(dot)org>
To: Alex Goncharov <alex-goncharov(at)comcast(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT
Date: 2010-05-25 11:56:18
Message-ID: 20100525115618.GA929@toroid.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At 2010-05-25 07:35:34 -0400, alex-goncharov(at)comcast(dot)net wrote:
>
> | Where does the result set (GBs of data) reside after I call
> | PQexecPrepared? On BE, I hope?

Unless you explicitly declare and fetch from an SQL-level cursor, your
many GBs of data are going to be transmitted to libpq, which will eat
lots of memory. (The wire protocol does have something like cursors,
but libpq does not use them, it retrieves the entire result set.)

-- ams

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicolas Barbier 2010-05-25 12:00:42 Re: Exposing the Xact commit order to the user
Previous Message Alex Goncharov 2010-05-25 11:35:34 Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT