From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Amarendra Konda <amar.vijaya@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: Too many SET TimeZone and Application_name queries
Date: Fri, 11 Oct 2019 07:03:27 -0700
Message-ID: <b541f5ce-1e6c-764a-5948-764acaa0f8f6@aklaver.com> (raw)
In-Reply-To: <CAJNAD0=HYZ3KNmuA9aJvRWz=05MwsHs5g_Vbo8nBu=q1Nf0FnQ@mail.gmail.com>
References: <CAJNAD0=HYZ3KNmuA9aJvRWz=05MwsHs5g_Vbo8nBu=q1Nf0FnQ@mail.gmail.com>
On 10/11/19 4:49 AM, Amarendra Konda wrote:
> Hi,
>
> In our test environment, it was observed that there are too many queries
> were getting fired to the database server, even though they are not part
> of the SQL query execution.
>
> And the number of queries that were coming to server are very high. Can
> you please suggest on how to avoid these queries to the database server ?
My guess is your application server/framework is setting the below.
What are you using for above?
>
>
> 2019-10-10 13:37:25 UTC:172.31.77.194(36920):
> user1@new_unity_green1:[2549]:LOG: duration: 0.081 ms statement: *SET
> application_name='PostgreSQL JDBC Driver';*
> 2019-10-10 13:37:25 UTC:172.31.69.112(45682):
> user1@new_unity_green0:[3545]:LOG: duration: 0.036 ms statement: *SET
> TimeZone='UTC';*
> 2019-10-10 13:37:25
> UTC:172.31.77.194(36902):user1@new_unity_green1:[2112]:LOG: duration:
> 0.177 ms statement: *SET TimeZone='Etc/UTC';SET
> application_name='PostgreSQL JDBC Driver';*
>
>
> *_Environment_*
>
> * PGBouncer 1.9
> * JDBC Driver 42.2.8
> * Java 1.8
> * PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.3
> 20140911 (Red Hat 4.8.3-9), 64-bit
>
>
> Application Server, pgBouncer and database server are all configured
> with UTC only.
>
> =>show timezone;
> TimeZone
> ----------
> UTC
>
> Thanks in advance,
>
> Regards, Amarendra
>
>
>
>
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, amar.vijaya@gmail.com
Subject: Re: Too many SET TimeZone and Application_name queries
In-Reply-To: <b541f5ce-1e6c-764a-5948-764acaa0f8f6@aklaver.com>
References: <CAJNAD0=HYZ3KNmuA9aJvRWz=05MwsHs5g_Vbo8nBu=q1Nf0FnQ@mail.gmail.com> <b541f5ce-1e6c-764a-5948-764acaa0f8f6@aklaver.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