Re: ResultSet storing all rows with defaulftFetchSize to 5000 - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: ResultSet storing all rows with defaulftFetchSize to 5000
Date
Msg-id 1921.1518461870@sss.pgh.pa.us
Whole thread Raw
In response to Re: ResultSet storing all rows with defaulftFetchSize to 5000  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Responses Re: ResultSet storing all rows with defaulftFetchSize to 5000  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
List pgsql-jdbc
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


pgsql-jdbc by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: ResultSet storing all rows with defaulftFetchSize to 5000
Next
From: Vladimir Sitnikov
Date:
Subject: Re: ResultSet storing all rows with defaulftFetchSize to 5000