Re: Query running for 12 hours - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Query running for 12 hours
Date
Msg-id 56911e4e-d8a7-1770-7f6b-cd2104979693@aklaver.com
Whole thread Raw
In response to Query running for 12 hours  (Yavuz Selim Sertoğlu <yavuzselim.sertoglu@bisoft.com.tr>)
Responses Re: Query running for 12 hours
List pgsql-general
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


pgsql-general by date:

Previous
From: Félix GERZAGUET
Date:
Subject: Re: execute block like Firebird does
Next
From: Adrian Klaver
Date:
Subject: Re: Update rules on views