pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Yavuz Selim Sertoğlu <yavuzselim.sertoglu@bisoft.com.tr>
To: pgsql-general@lists.postgresql.org
Subject: Re: Query running for 12 hours
Date: Wed, 30 May 2018 06:25:30 -0700
Message-ID: <56911e4e-d8a7-1770-7f6b-cd2104979693@aklaver.com> (raw)
In-Reply-To: <CAJTnKsqCvtCfOq5rL1S0scK6XMef4pjh5ty2pkFAuFCagK6VPQ@mail.gmail.com>
References: <CAJTnKsqCvtCfOq5rL1S0scK6XMef4pjh5ty2pkFAuFCagK6VPQ@mail.gmail.com>

On 05/30/2018 04:37 AM, Yavuz Selim Sertoğlu wrote:
> Hi everybody,
> *
> *
> *Today I saw that two queries have been running for more then 12 
> hours(They are the same query actually).*
> 
> /mydb=# select * from pg_stat_activity where state='active' and 
> state_change < now()-'12 hours'::interval;/
> 

> 
> *I've explained this query(I used $1 as now())*

What is the value of $1 in the queries?


> *PostgreSQL version is 9.5.3 on CentOS 7.2.1511*
> 
> /[root@myserver]# cat /etc/redhat-release/
> CentOS Linux release 7.2.1511 (Core)
> 
> /mydb=# select version();/
>                                                   version
> ---------------------------------------------------------------------------------------------------------
>   PostgreSQL 9.5.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 
> 20150623 (Red Hat 4.8.5-4), 64-bit
> (1 row)
> 
> I could not figure out what the problem is.
> I would be happy if someone could help me to solve this situation.
> 
> 
> -- 
> 
> Saygılarımla
> 



-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (10+ messages)  latest in thread

Message-ID: <56911e4e-d8a7-1770-7f6b-cd2104979693@aklaver.com>
Permalink:  ../56911e4e-d8a7-1770-7f6b-cd2104979693@aklaver.com/
Also on:    postgresql.org/message-id/56911e4e-d8a7-1770-7f6b-cd2104979693@aklaver.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 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, yavuzselim.sertoglu@bisoft.com.tr
  Subject: Re: Query running for 12 hours
  In-Reply-To: <56911e4e-d8a7-1770-7f6b-cd2104979693@aklaver.com>
  References: <CAJTnKsqCvtCfOq5rL1S0scK6XMef4pjh5ty2pkFAuFCagK6VPQ@mail.gmail.com> <56911e4e-d8a7-1770-7f6b-cd2104979693@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