Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1la8Fu-0003R2-O2 for pgsql-hackers@arkaria.postgresql.org; Sat, 24 Apr 2021 02:42:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1la8Ft-00034V-JU for pgsql-hackers@arkaria.postgresql.org; Sat, 24 Apr 2021 02:42:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1la8Ft-00034O-CP for pgsql-hackers@lists.postgresql.org; Sat, 24 Apr 2021 02:42:49 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1la8Fr-00045l-8S for pgsql-hackers@postgresql.org; Sat, 24 Apr 2021 02:42:48 +0000 Received: by mail-ej1-x62d.google.com with SMTP id n2so76463375ejy.7 for ; Fri, 23 Apr 2021 19:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowt-ie.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aSz9BOZGg//NK+kxRjDSSi+eqrAMCjHGs1lbsW4HAfs=; b=K4QT/4knQeRg5fwPBlz6Qr/2NfNThkCXSzHad1LKGAlZOB+SUtyZ7vlvbwdCOKfeGT h7Gv3X8b4sozTJb9KRQm0UZGkRqxCT2mInNzfGUMmWxXkN06uvFje+eEkXVdG4+CaKnh CHTyngeGhdh1txZopSE0RfLt9+hH+VP2KHQZMPt3falJ0fl7RcIkBhyPD/Mfe9bZZUou TISxTiGiqDckURj58Fc0ULw68pVEkKoVMlBFxkt2nLORjf6SO8b0h3CGL4L6szCdCUmY KXQpy50BxkLaXT4U711/IzQ2qX7IBdbpc2acLl9sHyaIe0gsPpRpW38oTYEPAzygp9qA iEiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aSz9BOZGg//NK+kxRjDSSi+eqrAMCjHGs1lbsW4HAfs=; b=ZUfR+C1kiXTVi+cj+ZlBz5rDk6dV6I/XifuYPf/bR8qugmpQbiJ7xPAM9q+DYNxY4F PKJwbGat1Te4xSmi7DdZLnqQx5T645J7w0e7zw0qexTxZz4wKiiT8MlB2jwDCGDZHyme sbCf0/rdnu3U57mVz46lPlZd88jZsxza9eHz09XVsBax5FphUKCmYDGwhvSu/Psr+OtK D74PSNPwzvGjAFFBwG31RiPBAJr6gGXIw+EaXJpdMworT7KWjuDN9gNV+Yvyy59Xndha Nk8T5aIzBH6q9UqSiYw0O2/eE5KZ7xkfNOiBmfPfOIBWzh8vM/BwwMJEn/0dZOREalTC hNEQ== X-Gm-Message-State: AOAM532WYdlxVh6rExSbMPNsqB2xE1I2dyy7nXua4igXW33AtZsfl08Q gfMYWqyXlwJcSZpGEij7nioVS2s4oT3IJBzPfMravw== X-Google-Smtp-Source: ABdhPJwxl7kkzWQUwLJnQUk+AxHF4olITcPIcH5Vh4k2lwdnGdn0ZmSIgzU+c/P5wbfmPb0dyCf8qtpOsv9Lresyb4U= X-Received: by 2002:a17:906:2cd1:: with SMTP id r17mr7067729ejr.429.1619232166137; Fri, 23 Apr 2021 19:42:46 -0700 (PDT) MIME-Version: 1.0 References: <20210423204306.5osfpkt2ggaedyvy@alap3.anarazel.de> <20210424002921.pb3t7h6frupdqnkp@alap3.anarazel.de> <20210424023314.iem2gxm7cuaj66au@alap3.anarazel.de> In-Reply-To: <20210424023314.iem2gxm7cuaj66au@alap3.anarazel.de> From: Peter Geoghegan Date: Fri, 23 Apr 2021 19:42:30 -0700 Message-ID: Subject: Re: Testing autovacuum wraparound (including failsafe) To: Andres Freund Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 23, 2021 at 7:33 PM Andres Freund wrote: > Check it every so often, independent of whether there are indexes or > dead tuples? Or just check it at the boundaries. I think that the former suggestion might be better -- I actually thought about doing it that way myself. The latter suggestion sounds like you're suggesting that we just check it at the beginning and the end in all cases (we do the beginning in all cases already, but now we'd also do the end outside of the loop in all cases). Is that right? If that is what you meant, then you should note that there'd hardly be any check in the one-pass case with that scheme (apart from the initial check that we do already). The only work we'd be skipping at the end (in the event of that check triggering the failsafe) would be heap truncation, which (as you've pointed out yourself) doesn't seem particularly likely to matter. -- Peter Geoghegan