From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Yavuz Selim Sertoğlu <yavuzselim(dot)sertoglu(at)bisoft(dot)com(dot)tr>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Query running for 12 hours |
Date: | 2018-05-30 13:25:30 |
Message-ID: | 56911e4e-d8a7-1770-7f6b-cd2104979693@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2018-05-30 13:37:09 | Re: Update rules on views |
Previous Message | Félix GERZAGUET | 2018-05-30 13:16:56 | Re: execute block like Firebird does |