Long Running query and trace potential issues - Mailing list pgsql-general

From KK CHN
Subject Long Running query and trace potential issues
Date
Msg-id CAKgGyB_a=D7fKf6Jh-2a9=jArKECODHn_xGRb=w6suXhS+SL-A@mail.gmail.com
Whole thread Raw
Responses Re: Long Running query and trace potential issues
Re: Long Running query and trace potential issues
List pgsql-general
List 

postgres=# SELECT PID, now() - pg_stat_activity.query_start AS duration, query, state FROM pg_stat_activity WHERE (now() - pg
_stat_activity.query_start) > interval '5 minutes' AND state = 'active';
 pid  |        duration         |                  query                   | state
------+-------------------------+------------------------------------------+--------
 3957 | 17 days 12:00:30.782583 | START_REPLICATION B5/EE000000 TIMELINE 1 | active
(1 row)
postgres=#

Postgres 16 and pgbackrest 2.52.1 on RHEL 9.4

  Is this a potential issue ? It has been running for 17 days .  ( I have configured WAL replication to a standby server and pgbackrest to a remote server )  is this  normal running 17 days START_REPLICATION B5/EE000000 TIMELINE1 active ?   


Any hints  to further trace  where the query is executing, what it's trying to perform, how to optimize if this is not normal ? Any guidance is much appreciated..

Thank you,
Krishane

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: How to debug: password authentication failed for user
Next
From: Greg Sabino Mullane
Date:
Subject: Re: Long Running query and trace potential issues