Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Wed, 20 Mar 2024 13:05:46 +0000 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: References: List-Id: X-GitHub-Author-Login: vlsi X-GitHub-Comment-Id: 2009523907 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3166 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3166#issuecomment-2009523907 Content-Type: text/plain; charset=utf-8 > Add PGProperty.PREFER_QUERY_MODE.set(props, "simple"); to your code and it works fine. I would treat simple query mode as a workaround only, and I would refrain from recommending "simple" by default. > And apparently query_id is not calculated for that. Do you mean backend does not produce query_id for extended queries? It sounds strange.