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 1idHjd-0002NP-Ha for pgsql-performance@arkaria.postgresql.org; Fri, 06 Dec 2019 17:49:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1idHjc-0006XG-83 for pgsql-performance@arkaria.postgresql.org; Fri, 06 Dec 2019 17:49:44 +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 1idHjb-0006UU-Nt for pgsql-performance@lists.postgresql.org; Fri, 06 Dec 2019 17:49:43 +0000 Received: from mail-yb1-xb44.google.com ([2607:f8b0:4864:20::b44]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1idHjX-0000dQ-6T for pgsql-performance@postgresql.org; Fri, 06 Dec 2019 17:49:43 +0000 Received: by mail-yb1-xb44.google.com with SMTP id r201so3261071ybc.10 for ; Fri, 06 Dec 2019 09:49:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :in-reply-to:user-agent; bh=fPjtSTFywiixU3dLERpUttXc5YHMc4vV2n2pgubYlwo=; b=nV4qmaVV/OGWRqe4XZ+8cTS0qZEZ87EItn5rI81T7JjaPBK7tP9WrEO65IcTzTguxN Ep1DqlEP6EH3fHZwNYlIBEvG4vJZMC1bRbLxbm3t1cjT3vBsgr6u/8xHMC0rl/B+Ml8a i/kEXZHiqcdIEZozB7RsUmkYQU+3VPv16B2WddrKDDcnvn29DEDU2mh9gK7KQpKKG1ep kjjbYSaY1D3Dqh2rb6uI3cuf9FDTfemHbnqxbGImG8DaQy1OMH729mLbp093E0wJxGwR maHuc6y6G4QSR2Ntw+zN1AQcREO+nIzRt1lGVdZ7AZZiKZ0lsqc/kA1T1t7Es0sKXJbh 4DcQ== 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:in-reply-to:user-agent; bh=fPjtSTFywiixU3dLERpUttXc5YHMc4vV2n2pgubYlwo=; b=UVfTi9rbiNe8C5VILcohZcfVQQnrAdDWzWQYRgMGmSDYOA6uv6cEVqH0bsGCz1QjXl ToEOOSkr/nFm7updu40A29Q2hs7Iqg8WsDDrumifQX77f1rUc0VuKpmaCXVGwq9Cg0VZ wzO2gDUHAvhxScLyLIl+fmP8N7DSgozgGah9navXTubWQAQMS8bxiX8MLaUbgD8k4RTl mEYfoME0n0X371Q75ODgp5GmTcPk3RA2uF21+Zsm8xetmix6aQEc3nx1UYyij5QngNJ/ DPooz7sUs3U9d56iq1Pb0uFTv4D+Pz8ca3Sgbu5SwbW4/MRho7p+XoxHP5vbCL5DesSK zYeg== X-Gm-Message-State: APjAAAVgFHLKWPdG+f8n0/7UV2FMD4xB/2Kw8KaAflYCfTOufLAMJ+eY SIv3aPztCk3AdUo3XKIEorA+cBDyuPE= X-Google-Smtp-Source: APXvYqwSJliarjk21IHtYMpLZ0VYgVu94kelthbG3B70p0UCNTfPr6dsnlGxSWJ4CwWFRJ3qVlfR8g== X-Received: by 2002:a25:858a:: with SMTP id x10mr11560052ybk.187.1575654576943; Fri, 06 Dec 2019 09:49:36 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id 189sm6200368ywx.45.2019.12.06.09.49.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Dec 2019 09:49:36 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 9269080096B; Fri, 6 Dec 2019 11:49:34 -0600 (CST) Date: Fri, 6 Dec 2019 11:49:34 -0600 From: Justin Pryzby To: Tom Lane , Jeff Janes Cc: Mike Schanne , pgsql-performance@postgresql.org Subject: Re: autovacuum locking question Message-ID: <20191206174934.GR2082@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <26221.1575589746@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Dec 05, 2019 at 06:49:06PM -0500, Tom Lane wrote: > The only part that would get canceled in response to somebody taking a > non-exclusive lock is the last step, which is truncation of unused blocks at > the end of the table; that requires an exclusive lock. On Thu, Dec 05, 2019 at 06:55:02PM -0500, Jeff Janes wrote: > If the vacuum finds a lot of empty pages at the end of the table, it will > try to truncate them and takes a strong lock to do so. Should the exclusive lock bit be documented ? https://www.postgresql.org/docs/12/explicit-locking.html