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.89) (envelope-from ) id 1i5MPT-0008FW-Ch for pgsql-general@arkaria.postgresql.org; Wed, 04 Sep 2019 03:56:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i5MPS-0004Bh-7i for pgsql-general@arkaria.postgresql.org; Wed, 04 Sep 2019 03:56:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5MPR-0004Ba-UT for pgsql-general@lists.postgresql.org; Wed, 04 Sep 2019 03:56:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i5MPP-0007ne-MM for pgsql-general@lists.postgresql.org; Wed, 04 Sep 2019 03:56:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x843uZCr026192; Tue, 3 Sep 2019 23:56:36 -0400 From: Tom Lane To: Julie Nishimura cc: "pgsql-general@lists.postgresql.org" Subject: Re: killing vacuum analyze process In-reply-to: References: ,<11967.1567552289@sss.pgh.pa.us> Comments: In-reply-to Julie Nishimura message dated "Tue, 03 Sep 2019 23:29:03 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26190.1567569395.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 03 Sep 2019 23:56:35 -0400 Message-ID: <26191.1567569395@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Julie Nishimura writes: > Thank you Tom. I can see bunch of old processes running ROLLBACK... Shou= ld I kill them or they only way to clear those is to restart the server? As Ron pointed out, those processes aren't actually running ROLLBACK; that was just their last query. They're idle (and not "idle in transaction") so in theory they're not holding any locks. After thinking more about it I realize that the process holding the buffer pin doesn't have to be as old as the VACUUM; so you probably should just look at pg_locks and see what else has got a lock on the table the VACUUM is trying to process. The hypothetical offender is probably somewhat old, or you'd not have noticed the blockage, but we don't have any clear evidence as to how old. regards, tom lane