Search Postgresql Archives

Re: Query running for 12 hours

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux