Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqhRM-0004eq-K0 for pgsql-general@arkaria.postgresql.org; Fri, 17 Aug 2018 16:17:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fqhRL-0002gR-2w for pgsql-general@arkaria.postgresql.org; Fri, 17 Aug 2018 16:17:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqhRJ-0002gJ-Tz for pgsql-general@lists.postgresql.org; Fri, 17 Aug 2018 16:17:30 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqhRB-0001bH-OK for pgsql-general@postgresql.org; Fri, 17 Aug 2018 16:17:28 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 779EA21ABB; Fri, 17 Aug 2018 12:17:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 17 Aug 2018 12:17:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=fW9LazPkKTPHWw466/Nhwy/ZMEfsi hCucW+u+PHfp34=; b=c/WOj7R3A2Hnzxlvjxi5xZypHYtm63ESonkTAaucTfbhj LpLOrpqwG7gXSorwnOjMpNXoXUBMI7/SclAr8oYjhRL4zTbHJqv1jfCnaEDoVpgQ JNjxuC2KS4tjf9vj2BIgWzHsg7RwaUwfh8Szzgqwjl2AI6fvsTkQiX2pBscSiqwu 5Qsh7dMRjlGuL38qHuXd9POYtN3Ync4vufQzNEK7OJTr3Z/S8vnipZQMfl0szuy/ EfO4sZIuNnt97zn5zYnPBla0hyV18/zik+ESy7yRr1gh7Ez0cHFcQ1VCX4TI0x4H ILXrUYlHPVkOAjE8Ebwj7l+uFNHGDV8rA7GoYbwsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=fW9Laz PkKTPHWw466/Nhwy/ZMEfsihCucW+u+PHfp34=; b=PeHunK3WUW7+Z6+yERyYDY iiSqDQHntsI4T/ynLrdDsOYpD0+o74zL5xJvz2d4aQlWNRPaRx/vcd2kIRzN2Mug h0deJ5Ks9VAHGlxhfR9qF6InSICU0xvMA5pkTAaw7NWkSsl3+zdg8T7J0SS4n7Gt fmNTfbYmxxIL8VaNWR3dwhxrb/qp9vfUR+4ig6XzZuzGWoyIdTzPmy7MTMOl1oj7 4tX3XYgLFSTBClRR8TgN851vnJ9RWU7eMSvfs4sgEF5PIdfUXmLizsUQi+VFdBF9 xPokeNqDudl5RbCmoq+9VyvLTpUrNmSxeFzkP2FIYtmSioLnzWmdmvmORIEeh/wQ == X-ME-Proxy: X-ME-Sender: Received: from ranger.suse (174-21-66-16.tukw.qwest.net [174.21.66.16]) by mail.messagingengine.com (Postfix) with ESMTPA id 5899E10286; Fri, 17 Aug 2018 12:17:19 -0400 (EDT) Subject: Re: pg_stat_activity.query_start in the future? To: Justin Pryzby , pgsql-general@postgresql.org References: <20180817161103.GA22271@telsasoft.com> From: Adrian Klaver Message-ID: <289a2d2e-11a4-7cda-2893-756cf304b620@aklaver.com> Date: Fri, 17 Aug 2018 09:17:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180817161103.GA22271@telsasoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 08/17/2018 09:11 AM, Justin Pryzby wrote: > I'm buried and not having any good ideas how to diagnose this or what else to > send, so here it is. Feel free to tell me why I'm the one whose confused.. > > postgres=# SELECT pid, now(), query_start, state, query FROM pg_stat_activity WHERE pid=27757; > pid | now | query_start | state | query > -------+-------------------------------+-------------------------------+--------+------------------------------------------------------------- > 27757 | 2018-08-17 11:10:16.568429-04 | 2018-08-17 10:17:52.814282-04 | active | autovacuum: VACUUM ANALYZE public.eric_enodeb_cell_20180815 > (1 row) > > postgres=# \! ps -O lstart 27757 > PID STARTED S TTY TIME COMMAND > 27757 Fri Aug 17 08:53:20 2018 S ? 00:11:56 postgres: autovacuum worker process xxxxxton > postgres=# \! date > Fri Aug 17 11:10:58 EDT 2018 Looks to me like the autovacuum process started at ~08:53 and the most recent query in that process ran at ~10:17 https://www.postgresql.org/docs/10/static/monitoring-stats.html#PG-STAT-ACTIVITY-VIEW "query_start timestamp with time zone Time when the currently active query was started, or if state is not active, when the last query was started" > > Justin > -- Adrian Klaver adrian.klaver@aklaver.com