Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group