pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: goranschwarz (@goranschwarz) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3166: query_id in pg_stat_activity is NULL when connecting from JDBC, but not from psql
Date: Mon, 18 Mar 2024 21:35:50 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

I see that you get the "correct" row at row 3   (is that a JDBC Connection or "something else")   
What does the previous rows say?

Below is my full output (only 2 rows)
```
Starting PgSleep...
>>>> ERROR: row[1], column 'query_id', shouldn't be NULL, it has a value if the statement was initiated from 'psql'...
PG-STAT-ACTIVITY: row[1], col[1] = |null|
PG-STAT-ACTIVITY: row[1], col[2] = |5|
PG-STAT-ACTIVITY: row[1], col[3] = |postgres|
PG-STAT-ACTIVITY: row[1], col[4] = |1442795|
PG-STAT-ACTIVITY: row[1], col[5] = |null|
PG-STAT-ACTIVITY: row[1], col[6] = |16384|
PG-STAT-ACTIVITY: row[1], col[7] = |dbxtune|
PG-STAT-ACTIVITY: row[1], col[8] = |PostgreSQL JDBC Driver|
PG-STAT-ACTIVITY: row[1], col[9] = |192.168.0.161|
PG-STAT-ACTIVITY: row[1], col[10] = |null|
PG-STAT-ACTIVITY: row[1], col[11] = |54781|
PG-STAT-ACTIVITY: row[1], col[12] = |2024-03-18 22:27:06.602158+01|
PG-STAT-ACTIVITY: row[1], col[13] = |2024-03-18 22:27:07.742059+01|
PG-STAT-ACTIVITY: row[1], col[14] = |2024-03-18 22:27:07.742851+01|
PG-STAT-ACTIVITY: row[1], col[15] = |2024-03-18 22:27:07.742852+01|
PG-STAT-ACTIVITY: row[1], col[16] = |Timeout|
PG-STAT-ACTIVITY: row[1], col[17] = |PgSleep|
PG-STAT-ACTIVITY: row[1], col[18] = |active|
PG-STAT-ACTIVITY: row[1], col[19] = |null|
PG-STAT-ACTIVITY: row[1], col[20] = |2235|
PG-STAT-ACTIVITY: row[1], col[21] = |null|
PG-STAT-ACTIVITY: row[1], col[22] = |select pg_sleep(3)|
PG-STAT-ACTIVITY: row[1], col[23] = |client backend|
>>>> ERROR: row[2], column 'query_id', shouldn't be NULL, it has a value if the statement was initiated from 'psql'...
PG-STAT-ACTIVITY: row[2], col[1] = |null|
PG-STAT-ACTIVITY: row[2], col[2] = |5|
PG-STAT-ACTIVITY: row[2], col[3] = |postgres|
PG-STAT-ACTIVITY: row[2], col[4] = |1442794|
PG-STAT-ACTIVITY: row[2], col[5] = |null|
PG-STAT-ACTIVITY: row[2], col[6] = |16384|
PG-STAT-ACTIVITY: row[2], col[7] = |dbxtune|
PG-STAT-ACTIVITY: row[2], col[8] = |PostgreSQL JDBC Driver|
PG-STAT-ACTIVITY: row[2], col[9] = |192.168.0.161|
PG-STAT-ACTIVITY: row[2], col[10] = |null|
PG-STAT-ACTIVITY: row[2], col[11] = |54782|
PG-STAT-ACTIVITY: row[2], col[12] = |2024-03-18 22:27:06.604805+01|
PG-STAT-ACTIVITY: row[2], col[13] = |2024-03-18 22:27:07.739081+01|
PG-STAT-ACTIVITY: row[2], col[14] = |2024-03-18 22:27:07.745152+01|
PG-STAT-ACTIVITY: row[2], col[15] = |2024-03-18 22:27:07.745153+01|
PG-STAT-ACTIVITY: row[2], col[16] = |null|
PG-STAT-ACTIVITY: row[2], col[17] = |null|
PG-STAT-ACTIVITY: row[2], col[18] = |active|
PG-STAT-ACTIVITY: row[2], col[19] = |null|
PG-STAT-ACTIVITY: row[2], col[20] = |2235|
PG-STAT-ACTIVITY: row[2], col[21] = |null|
PG-STAT-ACTIVITY: row[2], col[22] = |select query_id, * from pg_stat_activity where query like '%pg_sleep%'|
PG-STAT-ACTIVITY: row[2], col[23] = |client backend|
PG-SLEEP-RS: row[1], col[1] = ||
```


view thread (17+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #3166: query_id in pg_stat_activity is NULL when connecting from JDBC, but not from psql
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox