pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: aditya desai <admad123@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Pg_locks and pg_stat_activity
Date: Fri, 4 Dec 2020 02:17:54 -0600
Message-ID: <20201204081754.GA7761@telsasoft.com> (raw)
In-Reply-To: <CAN0SRDFXrOSP896-w3p4odrNhg2c+pswfE2L2XpXRsU4qfx9hg@mail.gmail.com>
References: <CAN0SRDFgPhyyP2yBphfVEYO0-K2uFXUk+C6euTCdx9jt5QkYwQ@mail.gmail.com>
	<20201204064822.GZ24052@telsasoft.com>
	<CAN0SRDFXrOSP896-w3p4odrNhg2c+pswfE2L2XpXRsU4qfx9hg@mail.gmail.com>

On Fri, Dec 04, 2020 at 01:31:14PM +0530, aditya desai wrote:
> Hi Justin,
> Many thanks for your response. Please see my response below.
> 
> What do you mean by API ?  If it's a different client, how does it connect ?
> Queries are getting called from Web UI built in Microservices spring boot.
> It connected to Database with JDBC driver. Developers have handled
> connection pooling at the Application side.
> 
> What db driver ?
> 
> Driver is JDBC

I suspect JDBC is using parameterized queries (postgres $1, $2, ..) and psql
isn't (unless you type "prepare p AS SELECT ..." and execute p(.., .., ..)"

You can search and find other people who reported similar issues.
https://www.postgresql.org/message-id/flat/A737B7A37273E048B164557ADEF4A58B50FB8D5E%40ntex2010i.host...
https://www.postgresql.org/message-id/flat/20200504191201.GU28974%40telsasoft.com

I don't know what server version you have, so I don't know whether to suggest
testing with plan_cache_mode=force_custom_plan

-- 
Justin





view thread (10+ messages)  latest in thread

Message-ID: <20201204081754.GA7761@telsasoft.com>
Permalink:  ../20201204081754.GA7761@telsasoft.com/
Also on:    postgresql.org/message-id/20201204081754.GA7761@telsasoft.com

 · 

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: pgsql-performance@postgresql.org
  Cc: pryzby@telsasoft.com, admad123@gmail.com, pgsql-performance@lists.postgresql.org
  Subject: Re: Pg_locks and pg_stat_activity
  In-Reply-To: <20201204081754.GA7761@telsasoft.com>

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

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