pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: postgresql statement problem
Date: Thu, 25 Aug 2022 22:39:46 +0200
Message-ID: <f2e6f9bb-e35b-e29c-4204-bc6e0e43fe3d@jakobs.com> (raw)
In-Reply-To: <CAGHjuab0DACgd0EE8nvAYs7j+EYGTA3a8MtejnjeTM7mO26vcQ@mail.gmail.com>
References: <CAGHjuab0DACgd0EE8nvAYs7j+EYGTA3a8MtejnjeTM7mO26vcQ@mail.gmail.com>

Am 25.08.22 um 22:31 schrieb liam saffioti:
> Hello Team,
>
> I am using PG 14.5, and I have a problem with connection. A connection 
> works more than 2 hours even though it's limited to two hours. How is 
> this possible?  The detail is below:
> (DWH user is not a superuser, it is a standard user that has select 
> only privilege.)
>
> show statement_timeout ;
>  statement_timeout
> -------------------
>  2h
>
> show max_standby_archive_delay ;
>  max_standby_archive_delay
> ---------------------------
>  2h
>
> show max_standby_streaming_delay ;
>  max_standby_streaming_delay
> -----------------------------
>  2h
>
> SELECT usename, state,wait_event, 
> backend_xmin,xact_start,query_start,state_change,now() FROM 
> pg_stat_activity WHERE backend_xmin IS NOT NULL ORDER BY 
> age(backend_xmin) DESC;
>  usename     |        state        | client_addr  | wait_event  | 
> backend_xmin |          xact_start           |  query_start          | 
>         state_change    | now
> --------+-----------------+---------------------+--------------+-------------+--------------+-------------------------------+-------------------------------+-------------------------------+-------------------------------
> DWH   | idle in transaction  | ClientRead  |  47730267 | 2022-08-25 
> 21:03:02.961309+03 | 2022-08-25 21:05:32.27796+03  | 2022-08-25 
> 21:05:32.285729+03 | 2022-08-25 23:22:24.830829
> DWH   | active               | ClientWrite |  47730267 | 2022-08-25 
> 21:03:56.984189+03 | 2022-08-25 21:03:57.062329+03 | 2022-08-25 
> 21:03:57.062329+03 | 2022-08-25 23:22:24.830829

You have set a statement timeout, but complain that a connection 
(session?) takes longer,

Unfortunately, the statement and the table you posted don't match. Plus, 
the table is very wide and almost illegible.

Please use option \x of psql to produce a better output.

Regards,

Holger

>
-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012



Attachments:

  OpenPGP_signature (application/pgp-signature, 202B) download

view thread (4+ messages)  latest in thread

Message-ID: <f2e6f9bb-e35b-e29c-4204-bc6e0e43fe3d@jakobs.com>
Permalink:  ../f2e6f9bb-e35b-e29c-4204-bc6e0e43fe3d@jakobs.com/
Also on:    postgresql.org/message-id/f2e6f9bb-e35b-e29c-4204-bc6e0e43fe3d@jakobs.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-admin@postgresql.org
  Cc: holger@jakobs.com, pgsql-admin@lists.postgresql.org
  Subject: Re: postgresql statement problem
  In-Reply-To: <f2e6f9bb-e35b-e29c-4204-bc6e0e43fe3d@jakobs.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