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 1hEcuQ-0005kI-0X for pgsql-general@arkaria.postgresql.org; Thu, 11 Apr 2019 16:50:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hEcuO-0001l0-NK for pgsql-general@arkaria.postgresql.org; Thu, 11 Apr 2019 16:50:40 +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 1hEcuO-0001bR-3U for pgsql-general@lists.postgresql.org; Thu, 11 Apr 2019 16:50:40 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEcuL-0006aR-3B for pgsql-general@postgresql.org; Thu, 11 Apr 2019 16:50:38 +0000 Received: by mail-qt1-x844.google.com with SMTP id p20so7870524qtc.9 for ; Thu, 11 Apr 2019 09:50:36 -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=fm4xlp5bJHnuvEKEwnwQAY+2UzM3NEgnA1jmPZaG3vU=; b=MA1YVpk7BhNGJU9SkGigwfftfjRAf6Nfvqnqb/PNUSIWDeQyN4GnhFscq6i3uwtyJt XU9jAUoyqdWNZFIp6IYXPNO3OIA0SKrZt/chwnCal+14uTk1DGPAWPMfpBr2JudX1vjR CUoiyhJ69l2Ab7fk1fYjac757YLgZPzVGcyilG4jp+wv2HoMuFLWoooy99MREVKoLj1q YbjJ/mmmLEH71zuzIDfHOPLpwPGJe5IR9c+bk325cqLo9Doh6zjS8Lew9wbQbrZFNcRV P3k9TvTQdakaxi5IYxcrXK0ufwZm6mJFz5wWbKZY6PRifoOwb0+j4MYOgVzIoWwq7l8d J8mA== 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=fm4xlp5bJHnuvEKEwnwQAY+2UzM3NEgnA1jmPZaG3vU=; b=FGRysAJ6e+CwBduEU3rRfUmpzo7ci+DZiCqHtVYR1f/QuVwbuWMHR62HoLIW7tyX2w ai6nNxya8eKDAWk8/wDy/uU5MPy3uGPilFdtOT27T+CL+q+SwCSuAlfvNZ0AQawfHyUc k4GdfnBdoLk97KHe8ERhw021jWTHEOgFMrssVIRpPXub4srlgPkdwKAG+I70+JDyNDxU ZOYngsBV82j8FpW0WmXOwcX2lrzHoTSbB4UeFT+CQ47GBZSVVuKvBxJW4rKQagbxemrx BBvY6ZY0YMzzI3cNi6QUGUnK89IofEwEUYzzqMsthEEuHeRa0mrsosQGWYg4rmg65j8O AIjw== X-Gm-Message-State: APjAAAVznQ8haSbhYeSpTuI6Wp845hsPVdeJz/DSlXXOlZM5pjTi36Jj Mxql/FZGvVS39epcm7vewUKXWg== X-Google-Smtp-Source: APXvYqwHq6dPbWbT0ejIXGSF5yQwbJP2yQ4gShlSUtnJXdB4sydJvXmuB1Dc/dHM6pIUrdwmCEWSdw== X-Received: by 2002:ac8:2ed4:: with SMTP id i20mr43674850qta.52.1555001435802; Thu, 11 Apr 2019 09:50:35 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id p27sm23611058qte.25.2019.04.11.09.50.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Apr 2019 09:50:35 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 2240B120FBF; Thu, 11 Apr 2019 12:50:33 -0400 (-04) Date: Thu, 11 Apr 2019 12:50:33 -0400 From: Alvaro Herrera To: rihad Cc: Jeff Janes , Tom Lane , pgsql-general General Subject: Re: When do vacuumed pages/tuples become available for reuse? Message-ID: <20190411165033.GA19432@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <44a10837-648b-7cc9-d42a-146bc0c83574@mail.ru> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Apr-11, rihad wrote: > 2019-04-11 19:39:44.450844500   tuples: 19150 removed, 2725811 remain, 465 are dead but not yet removable What Jeff said. This vacuum spent a lot of time, only to remove miserly 19k tuples, but 2.7M dead tuples remained ... probably because you have long-running transactions preventing vacuum from removing them. Maybe that was pg_dump. I suspect what you really need is keep an eye on the age of your oldest transactions. Don't leave anything "idle in transaction". -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services