# Postgres EF2 querying group errors

**URL:** <https://community.dynatrace.com/t/postgres-ef2-querying-group-errors/47215>\
**Category:** Extensions\
**Tags:** postgresql, extensions\
**Created:** [August 20, 2024, 12:51pm UTC](https://community.dynatrace.com/t/postgres-ef2-querying-group-errors/47215 "2024-08-20T12:51:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [August 20, 2024, 12:51pm UTC](https://community.dynatrace.com/t/postgres-ef2-querying-group-errors/47215/1 "2024-08-20T12:51:55Z")

</div>

Hi guys,

Customer installed Postgres EF2 and see the follows errors in logs

```python
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out][59fe9974-0efc-3f6b-b9f1-0c0f2899e878]2024-08-13 | 11:16:43.046 | pool-5-thread-1 | ERROR | c.d.s.p.p.AbstractPoller | While polling from endpoint ServerName:PortNum:postgres, querying group 'pg_stat_statements_topn_14+' failed
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]org.apache.tomcat.jdbc.pool.PoolExhaustedException: [pool-5-thread-1] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:1; busy:1; idle:0; lastwait:30000].
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:741)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:199)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:133)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at com.dynatrace.sql.jdbc.JdbcExecutor.getConnection(JdbcExecutor.java:136)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at com.dynatrace.sql.jdbc.JdbcExecutor.execute(JdbcExecutor.java:57)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at com.dynatrace.sql.polling.pollers.AbstractPoller.poll(AbstractPoller.java:79)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at com.dynatrace.sql.polling.pollers.TopNPoller.poll(TopNPoller.java:77)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at com.dynatrace.sql.polling.pollers.TopNPoller.lambda$schedulePolling$1(TopNPoller.java:103)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[59fe9974-0efc-3f6b-b9f1-0c0f2899e878][1270370671638307859][4772][out]	at java.base/java.lang.Thread.run(Unknown Source)

```

We see in logs those errors for the follows groups:

- ‘pg\_stat\_statements\_topn’
- ‘pg\_stat\_statements\_topn\_12-’
- ‘pg\_stat\_statements\_topn\_14+’
- ‘pg\_stat\_activity\_aggregated’
- ‘pg\_stat\_activity\_longest’

Customer says there is no tables that he can see with those names

Questions:

- From where those groups are coming?
- How can we eliminate those errors?

Postgres version is 15.3

EF2 version is 2.2.2

Thanks in advance for your inputs

Yos

---

<div class="post-metadata">

**Author:** ![Tom\_sSeroteRoos](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Tom\_sSeroteRoos](https://community.dynatrace.com/u/Tom_sSeroteRoos)\
**Post date:** [August 21, 2024, 7:10am UTC](https://community.dynatrace.com/t/postgres-ef2-querying-group-errors/47215/2 "2024-08-21T07:10:36Z")

</div>

Those are just the names of the groups in the extension. The extension actually goes to

**pg\_stat\_statements** for

- ‘pg\_stat\_statements\_topn’
- ‘pg\_stat\_statements\_topn\_12-’
- ‘pg\_stat\_statements\_topn\_14+’

**pg\_stat\_activity** for

- ‘pg\_stat\_activity\_longest’
- pg\_stat\_activity\_aggregated

You can see this and the exact queries yourself by downloading the extension zip file for your version from the [Dynatrace Hub](https://www.dynatrace.com/hub/detail/postgresdb-remote-monitoring/?query=postgres&filter=all#release-notes) and checking the extension.yaml file.

From the error message, the problem seems to be related to the connection from the AG to the database though… I would suggest opening a support ticket with Dynatrace so that they can have a look at the AG support archive and see exactly what’s going on. This kind of problem can be tricky.

---

<div class="post-metadata">

**Author:** ![Yosi\_Neuman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/yosi_neuman/32/9845_2.png) [@Yosi\_Neuman](https://community.dynatrace.com/u/Yosi_Neuman)\
**Post date:** [August 21, 2024, 1:13pm UTC](https://community.dynatrace.com/t/postgres-ef2-querying-group-errors/47215/3 "2024-08-21T13:13:54Z")

</div>

Thanks&nbsp;[@TomásSeroteRoos](https://community.dynatrace.com/user/55565)

We will open a support ticket

Yos
