DBeaver client creates two additional idle connections after login into Greenplum
search cancel

DBeaver client creates two additional idle connections after login into Greenplum

book

Article ID: 297061

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

There are two additional idle connection always when checking it in pg_stat_activity table as below as soon as users login into Greenplum from DBeaver client.

[gpadmin@mdw ~]$ psql -c "select * from pg_stat_activity where application_name like '%DBeaver%'"
 datid | datname | pid  | sess_id | usesysid | usename |          application_name          |  client_addr  | client_hostname | client_port |         backend_start         | xact_start
 |          query_start          |         state_change          | waiting | state | backend_xid | backend_xmin |                                                     query
                                         | waiting_reason | rsgid | rsgname | rsgqueueduration
-------+---------+------+---------+----------+---------+------------------------------------+---------------+-----------------+-------------+-------------------------------+-----------
-+-------------------------------+-------------------------------+---------+-------+-------------+--------------+-----------------------------------------------------------------------
-----------------------------------------+----------------+-------+---------+------------------
 17789 | testdb  | 2713 |      56 |       10 | gpadmin | DBeaver 22.2.2 - Main <testdb>     | xxx.xxx.xxx.xxx |                 |       51617 | 2023-06-13 22:09:03.318454-04 |
 | 2023-06-13 22:09:03.375575-04 | 2023-xx-xx 22:09:03.375635-04 | f       | idle  |             |              | SHOW search_path
                                         |                |     0 | unknown |

 17789 | testdb  | 2715 |      57 |       10 | gpadmin | DBeaver 22.2.2 - Metadata <testdb> | xxx.xxx.xxx.xxx |                 |       51618 | 2023-06-13 22:09:03.379169-04 |
 | 2023-06-13 22:09:03.450556-04 | 2023-xx.xx 22:09:03.457188-04 | f       | idle  |             |              | SELECT t.oid,t.*,c.relkind,format_type(nullif(t.typbasetype, 0), t.typ
typmod) as base_type_name, d.description+|                |     0 | unknown |
~~ snip

Due to this extra idle connections created by DBeaver users are getting too many connections error. What's the cause and resolution to fix this issue?


Environment

Product Version: 6.23
OS: RHEL or CentOS 7.x

Resolution

Firstly Open DBeaver and go to Preference -> Connections -> Metadata -> open seperate connection for metadata read and uncheck this property.
Secondly go to Preference -> Connections -> Client Identification -> Disable client identification and check this property and then close connection and reconnect Greenplum from DBeaver.

The idle connections would be disappeared as below when checking pg_stat_activity.

[gpadmin@mdw ~]$ psql -c "select * from pg_stat_activity where application_name like '%DBeaver%'"
 datid | datname | pid | sess_id | usesysid | usename | application_name | client_addr | client_hostname | clien
t_port | backend_start | xact_start | query_start | state_change | waiting | state | backend_xid | backend_xmin
| query | waiting_reason | rsgid | rsgname | rsgqueueduration
-------+---------+-----+---------+----------+---------+------------------+-------------+-----------------+------
-------+---------------+------------+-------------+--------------+---------+-------+-------------+--------------
+-------+----------------+-------+---------+------------------
(0 rows)