pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-jdbc@postgresql.org
Subject: Re: Disk buffering of resultsets
Date: Sun, 21 Sep 2014 09:06:44 +0200
Message-ID: <lvlte4$jn$1@ger.gmane.org> (raw)
In-Reply-To: <ADD972C51196844491C410BCD4146DCD60A99AA819@dnaexc01.diennea.lan>
References: <ADD972C51196844491C410BCD4146DCD60A99AA819@dnaexc01.diennea.lan>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Enrico Olivelli - Diennea wrote on 19.09.2014 12:44:
> Hi,
>
> we are moving from Oracle to PostgreSQL and we hit a serious
> problem.
>
> When executing a query with a large result set your driver loads each
> record in memory and this is a blocking problem for us.
>
> The work-around is to use server-side cursors
> (http://jdbc.postgresql.org/documentation/head/query.html) but in
> order to do this we have to change autocommit mode of the transaction
> and this will change transaction semantics of out code.
>
> Many JDBC drivers provide some swap-to-disk function in oredr to deal
> with huge result sets
>
> Something like “if we are loading in RAM more than X MBs than swap on
> disk”
>
> or  “if we are loading in RAM more than X rows than swap on disk”
> (more simple to implement)
>

Wouldn't it make more sense to allow for a non-buffered result when using auto-commit
(something like "bufferResults=false") instead?

Or is that technically not possible due to the Postgres wire-protocol?

Thomas




-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (37+ messages)  latest in thread

Message-ID: <lvlte4$jn$1@ger.gmane.org>
Permalink:  ../lvlte4$jn$1@ger.gmane.org/
Also on:    postgresql.org/message-id/lvlte4$jn$1@ger.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Disk buffering of resultsets
  In-Reply-To: <lvlte4$jn$1@ger.gmane.org>
  References: <ADD972C51196844491C410BCD4146DCD60A99AA819@dnaexc01.diennea.lan> <lvlte4$jn$1@ger.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox