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 1fpKBI-0005s7-B4 for pgsql-general@arkaria.postgresql.org; Mon, 13 Aug 2018 21:15:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fpKBG-0001GR-7n for pgsql-general@arkaria.postgresql.org; Mon, 13 Aug 2018 21:15:14 +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 1fpKBF-0001Fu-O4 for pgsql-general@lists.postgresql.org; Mon, 13 Aug 2018 21:15:14 +0000 Received: from mail-qt0-x241.google.com ([2607:f8b0:400d:c0d::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fpKBC-0005Vp-3M for pgsql-general@postgresql.org; Mon, 13 Aug 2018 21:15:12 +0000 Received: by mail-qt0-x241.google.com with SMTP id n6-v6so19062610qtl.4 for ; Mon, 13 Aug 2018 14:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=AjJWsRJTRKRrCNZh5Ml+FyfhzxJ6isttm9rXW4vN5Bs=; b=ieE4yGm1oLF3p68d1rYgkB9JU/qrPSaLFRTm6ChZ9Xn2ClBOoFMXknnE+h+6e9KJog tGrmcTuYM6KvSjlgfVnrfher9jqWqQPUz6K+KEvpO1RPG+glbIvCHz4CUv19Wuq94cCI ehaWBAzvU94/p2GwobhoFLXZKFc1zZQxAWu0+MKbtARgQGjFpvWQHeuzg1OZbr3vF1rd ayiltMHzSz9bpYIqzasNlmBAeVwsl0YXqIbQqqTtSq/TJMb3oQN+KJYFS1Rljuk28b5y WZkjpnwoerfizXlIt6aFV+NMK3oLZ4MYPlat1ayr++h3as5FrvAYe65le8c3LXQiSPSD HxSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=AjJWsRJTRKRrCNZh5Ml+FyfhzxJ6isttm9rXW4vN5Bs=; b=rRu17mgVb1BZ25ACn87aD00qbsB457vfRX/8so+1O65/3Qbzsqkfql5VybKXLJugN8 GzvqIrQks6VpxlnRizUl/nQ3ilKHOLSjl6iN4msHZ5BbPkzK83SqstXyQv+yDnJa87OE Uk5i01w9pnlVckXmnLHXVFH7J03D0lduYs+QwGJjwApdTQ50va06/jZvQ2IYDYlXCvNV 1J0/jkttlBqdlw6fxVbNC2GNSZqnrBjlFSoApEJM4cYq5KtQ5RVqQbNk3D4HyVNahdsf 5SyqxoXHW4cNA5WZLVcaL9cuNaO5goJWRtTEF/seMUAJaIOgHqYyWqGa/x6BN9TevxLV QoRw== X-Gm-Message-State: AOUpUlH06BVc2Wugm3EG8KQCiB+7hMa704CWJuzunVhF3ExsGNmjTD8J PmddoX7Pco65C4k6Br6/zQT/ZpqgEC7lvv5uXgYAodn14tbf0RoZzHex7Twl42RK004151Rj0Fa 8HoB5bkei7b52e9ple/8kxTEueg4o2OZNwZVQR4Fxs+VabIFLlJpFdR7dVcXewz/xYkGgVDkVNk jAGGaZqw== X-Google-Smtp-Source: AA+uWPzMO8VeAuouXpreBPUhx/xEVKT8OpIrKx4EDDgcgfhnZXcgB9Bw7iVyWRL6MWYmmTBUBtRJ4A== X-Received: by 2002:ac8:25f1:: with SMTP id f46-v6mr19240411qtf.20.1534194909006; Mon, 13 Aug 2018 14:15:09 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id m95-v6sm10520229qte.69.2018.08.13.14.15.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Aug 2018 14:15:08 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 895DC569; Mon, 13 Aug 2018 18:15:06 -0300 (-03) Date: Mon, 13 Aug 2018 18:15:06 -0300 From: Alvaro Herrera To: Don Seiler Cc: Postgres General Subject: Re: Vacuum process waiting on BufferPin Message-ID: <20180813211506.spvawcczdukdxa4u@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-Aug-13, Don Seiler wrote: > This afternoon I discovered an autovacuum process that had been running for > over 6 days. It was waiting on BufferPin event. I kicked off a manual > vacuum+analyze of the table, which automatically killed that autovacuum. > This ran for a few minutes before it too was waiting on a BufferPin event. > I've never witnessed a vacuum session waiting on BufferPin before. Buffer pins are normally released quickly enough. Of course, an idle-in-transaction session has its own problems, but even those would normally not have buffer pins; so vacuum would run to completion without blocking, even if no tuples would be removed. Maybe you had a cursor that was not fully scanned before the session was left idle -- as I recall, those can leave buffers pinned. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services