Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jAFXr-0007dY-3p for pgsql-general@arkaria.postgresql.org; Fri, 06 Mar 2020 16:09:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jAFXo-0007kX-QE for pgsql-general@arkaria.postgresql.org; Fri, 06 Mar 2020 16:09:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jAFXn-0007dV-1c for pgsql-general@lists.postgresql.org; Fri, 06 Mar 2020 16:09:48 +0000 Received: from [66.111.4.26] (helo=out2-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jAFXj-0003HK-ID for pgsql-general@lists.postgresql.org; Fri, 06 Mar 2020 16:09:45 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 9000B2245F; Fri, 6 Mar 2020 11:09:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 06 Mar 2020 11:09:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=K hodf6XgzI25dPuplJcnCBZMZQ64VYoyyJuc9T6gr8A=; b=ZZ/sBIlIyutiQHmLs KuG+QpNCkpOWEPb3vpHY1XwiOtizr/HsOKJDxGx8EmLuBrZ6gm7NT3fdK+9mVWYw MBHEyT1vbv4/oOV1te1p9WFvFjKhSRavBXDymJg16CFI9SFotvMVZT1DfbduGtGQ JnEuqIpNgoJJOTYJGKxp4OoluhZMakJq5vxQDc06wPgLrpubsMSn6gA6ctt/JRMu rjQUQNU+2oQJx9NjTOqPs9NRftWs1b6AogJpIYkeFeVu+fcwp6y522nKrAFK78OZ xIghNmZeyeisl9nrL77ytx/sGBiiXBoF5uhqQteatCTWLZuyGy/y+Y3NKGTcaczR +k9Vg== 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Khodf6XgzI25dPuplJcnCBZMZQ64VYoyyJuc9T6gr 8A=; b=RCZqnly5enYV/G0fNFrm9vFFb4zPxJ0t897lW3n4Fo2yIuUWcs15/PblR I6L9eRBqDF5yJOwzKfDqkcpkk3u2q1OBfqTBtJH3Ok/RC56Bxn4e2agL08Q7KPil ytH+ZX232LYRVaf/kqWsJ1UVVWNOrSOwxYVu29HNQhAw9TpzgxqmUjE3dgD+9AsG mxzGD819W0aSEt1Jxv9AwhtrhksAI6+OlT9MfSSZ0j5Yy1i6wJTTC8dr/vmOQHWf 7JM2AAkr3sEUTTaeTNS/jybHxZVR7f5zfbPRCNosGLpPJPbzqxNx0wCmTpCf1vav EKyB58L9Ex1WEPmEai3GzgMtoPBZg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudduvddgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeejuddrvddu vddruddvledrudelfeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.10] (unknown [71.212.129.193]) by mail.messagingengine.com (Postfix) with ESMTPA id BDB353280059; Fri, 6 Mar 2020 11:09:31 -0500 (EST) Subject: Re: What do null column values for pg_stat_progress_vacuum mean? To: Mark Haylock , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <92471e8a-fbdf-5349-8fa2-2c6afd9eed6e@aklaver.com> Date: Fri, 6 Mar 2020 08:09:30 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.26 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 3/5/20 6:39 PM, Mark Haylock wrote: > Hi, > > We have an autovacuum process that has been running for almost 27 hours: > > SELECT * FROM pg_stat_activity WHERE pid = 11731; > -[ RECORD 1 ]----+--------------------------------------- > datid | 16385 > datname | database_name > pid | 11731 > usesysid | > usename | > application_name | > client_addr | > client_hostname | > client_port | > backend_start | 2020-03-04 23:40:14.828138+00 > xact_start | 2020-03-04 23:40:14.849367+00 > query_start | 2020-03-04 23:40:14.849367+00 > state_change | 2020-03-04 23:40:14.849368+00 > wait_event_type | > wait_event | > state | active > backend_xid | > backend_xmin | 3801997676 > query | autovacuum: VACUUM public.responses > backend_type | autovacuum worker > > A row shows up in pg_stat_progress_vacuum, but it contains null values > for every column. > > SELECT * FROM pg_stat_progress_vacuum WHERE pid = 11731; > -[ RECORD 1 ]------+--------------- > pid | 11731 > datid | 16385 > datname | d2j496215lfs41 > relid | > phase | > heap_blks_total | > heap_blks_scanned | > heap_blks_vacuumed | > index_vacuum_count | > max_dead_tuples | > num_dead_tuples | > > I see nothing in the documentation to suggest that this is an expected > state - what does it mean? Not sure, but you might try: https://www.postgresql.org/docs/10/view-pg-locks.html The pid column can be joined to the pid column of the pg_stat_activity view to get more information on the session holding or awaiting each lock, for example SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid; > > Thanks, > Mark. > > -- Adrian Klaver adrian.klaver@aklaver.com