pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Cc: Jaime Soler <jaime.soler@gmail.com>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Brad DeJong <bpd0018@gmail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: ResultSet storing all rows with defaulftFetchSize to 5000
Date: Mon, 12 Feb 2018 13:57:50 -0500
Message-ID: <1921.1518461870@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB=Je-HnaV1cEHZfdtTrV=QjYc-F47rbhsOo5PQowPao4DiXxQ@mail.gmail.com>
References: <CAKVUGgSRwC=dNXL0T6vq2eH6ChwAf5FjCQD5A=9J9oO46-7VEg@mail.gmail.com>
	<CAJnrtnwzjFApwFVpyz=Fc7=d_VaZFTyoMrJ3PO_qf5+OWo-p2w@mail.gmail.com>
	<CADK3HH+X48GfCM=Qo7a1XSuCyGradAXou6+t+x6qtKCXbf9WqQ@mail.gmail.com>
	<CAKVUGgQj-cT4UVQQTKpN4ZAj_ikqWoqaKCpOvSQDXA8zdunaRA@mail.gmail.com>
	<CAB=Je-GC4zSYuZ55s-TA4-Zuvw6k4gWNWfod1h2cT_iMMbPwBQ@mail.gmail.com>
	<3558.1518451137@sss.pgh.pa.us>
	<CAB=Je-G-_m46JH85Sg=PAg3BqExF-oELutUxNipaJMW-v_CemA@mail.gmail.com>
	<5505.1518453548@sss.pgh.pa.us>
	<CAB=Je-HnaV1cEHZfdtTrV=QjYc-F47rbhsOo5PQowPao4DiXxQ@mail.gmail.com>

Vladimir Sitnikov <sitnikov.vladimir@gmail.com> writes:
> The backend materializes, so it is a sad thing.
> Is there a change "with hold" can be implemented without materialization?

That would not be an improvement.  If we didn't materialize, then we'd
have to retain the locks held by the transaction, as well as keep global
xmin from advancing, so that the rows the cursor still needed to fetch
would not get cleaned by VACUUM nor would the tables containing them get
dropped or significantly altered.  Either effect would be awful for
performance if the cursor was held for long.  Moreover, keeping the locks
would effectively mean that the transaction wasn't really ended.  So if
that's what you want, don't commit the transaction.

			regards, tom lane




view thread (16+ messages)  latest in thread

Message-ID: <1921.1518461870@sss.pgh.pa.us>
Permalink:  ../1921.1518461870@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1921.1518461870@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, sitnikov.vladimir@gmail.com, jaime.soler@gmail.com, pg@fastcrypt.com, bpd0018@gmail.com
  Subject: Re: ResultSet storing all rows with defaulftFetchSize to 5000
  In-Reply-To: <1921.1518461870@sss.pgh.pa.us>
  References: <CAKVUGgSRwC=dNXL0T6vq2eH6ChwAf5FjCQD5A=9J9oO46-7VEg@mail.gmail.com> <CAJnrtnwzjFApwFVpyz=Fc7=d_VaZFTyoMrJ3PO_qf5+OWo-p2w@mail.gmail.com> <CADK3HH+X48GfCM=Qo7a1XSuCyGradAXou6+t+x6qtKCXbf9WqQ@mail.gmail.com> <CAKVUGgQj-cT4UVQQTKpN4ZAj_ikqWoqaKCpOvSQDXA8zdunaRA@mail.gmail.com> <CAB=Je-GC4zSYuZ55s-TA4-Zuvw6k4gWNWfod1h2cT_iMMbPwBQ@mail.gmail.com> <3558.1518451137@sss.pgh.pa.us> <CAB=Je-G-_m46JH85Sg=PAg3BqExF-oELutUxNipaJMW-v_CemA@mail.gmail.com> <5505.1518453548@sss.pgh.pa.us> <CAB=Je-HnaV1cEHZfdtTrV=QjYc-F47rbhsOo5PQowPao4DiXxQ@mail.gmail.com> <1921.1518461870@sss.pgh.pa.us>

* 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