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 1i5Hxc-0006wP-0T for pgsql-general@arkaria.postgresql.org; Tue, 03 Sep 2019 23:11:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i5Hxa-000257-01 for pgsql-general@arkaria.postgresql.org; Tue, 03 Sep 2019 23:11:38 +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 1i5HxZ-0001y4-Ic for pgsql-general@lists.postgresql.org; Tue, 03 Sep 2019 23:11:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i5HxW-0007q8-Oj for pgsql-general@lists.postgresql.org; Tue, 03 Sep 2019 23:11:35 +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 x83NBTbe011968; Tue, 3 Sep 2019 19:11:29 -0400 From: Tom Lane To: Julie Nishimura cc: "pgsql-general@lists.postgresql.org" Subject: Re: killing vacuum analyze process In-reply-to: References: Comments: In-reply-to Julie Nishimura message dated "Tue, 03 Sep 2019 23:02:20 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11966.1567552289.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 03 Sep 2019 19:11:29 -0400 Message-ID: <11967.1567552289@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Julie Nishimura writes: > PostgreSQL 9.6.2 on x86_64-pc-linux-gnu > It seems like we have one process running since 8/19. Is it any repercus= sion if we kill it? > postgres=3D# select * from pg_stat_activity where pid =3D '18986'; > -[ RECORD 1 ]----+------------------------------------------------------= ------------------- > datid | 2342921 > datname | symphony_middleware > pid | 18986 > usesysid | 10 > usename | postgres > application_name | > client_addr | > client_hostname | > client_port | > backend_start | 2019-08-19 02:00:59.683198+00 > xact_start | 2019-08-19 02:03:54.191741+00 > query_start | 2019-08-19 02:03:54.191741+00 > state_change | 2019-08-19 02:03:54.191742+00 > wait_event_type | BufferPin > wait_event | BufferPin > state | active > backend_xid | > backend_xmin | 1075730757 > query | autovacuum: VACUUM ANALYZE public.resource_build (to = prevent wraparound) Since this is an anti-wraparound vacuum, autovacuum is just going to launch another one pretty soon if you kill this one. Assuming that the buffer pin blockage is real and not some kind of broken shared memory state, the new one will hang up at the same spot. You'd be better advised to find out what's pinning that buffer and kill that. Admittedly this is easier said than done, since there's not much infrastructure for seeing what's happening at that level. But you could look for transactions that are at least as old as this one and have some kind of lock on that table (according to pg_locks). If there are no such transactions, then the corrupt-shared-memory hypothesis becomes likely, and a postmaster restart is indicated. BTW, you really ought to be running something newer than 9.6.2. regards, tom lane