Combination of ordered-set aggregate function terminates JDBC connection on PostgreSQL 9.6.5
Lukas Eder <lukas.eder@gmail.com>
From: Lukas Eder <lukas.eder@gmail.com>
To: pgsql-bugs@postgresql.org
Date: 2017-10-11T08:49:19Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Treat aggregate direct arguments as per-agg data not per-trans data.
- cf5ba7c30c04 11.0 landed
-
Allow the built-in ordered-set aggregates to share transition state.
- be0ebb65f512 11.0 landed
-
Fix AggGetAggref() so it won't lie to aggregate final functions.
- 305cf1fd7239 11.0 landed
- d48bf6a94d29 10.1 landed
- aa1e9b3a4661 9.6.6 landed
-
Prevent sharing transition states between ordered-set aggregates.
- 52328727bea4 11.0 landed
- 96cfc7e19ae1 9.6.6 landed
- 604723d29a86 10.1 landed
When running the following query:
select
cume_dist(1) within group (order by a desc),
rank(1) within group (order by a desc),
dense_rank(1) within group (order by a asc),
percent_rank(1) within group (order by a asc)
from (values(1)) t(a);
My JDBC connection is immediately terminated:
SQL Error [08006]: An I/O error occurred while sending to the backend.
An I/O error occurred while sending to the backend.
Connection reset
The issue depends on a certain set of combinations of the above function
calls. Each function can be called individually without problems. Some
functions can be combined without problems as well.
The issue can be reproduced in pgAdmin III and pgAdmin 4.
I'm using PostgreSQL 9.6.5 on Windows 10 x86-64
SELECT version();
version |
------------------------------------------------------------|
PostgreSQL 9.6.5, compiled by Visual C++ build 1800, 64-bit |
Thanks,
Lukas