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 1pBhoF-0000Xn-Dj for pgsql-hackers@arkaria.postgresql.org; Sat, 31 Dec 2022 19:46:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pBhoE-0007zX-CW for pgsql-hackers@arkaria.postgresql.org; Sat, 31 Dec 2022 19:46:22 +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 1pBhoE-0007zO-0t for pgsql-hackers@lists.postgresql.org; Sat, 31 Dec 2022 19:46:22 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pBhoB-0000so-Cu for pgsql-hackers@lists.postgresql.org; Sat, 31 Dec 2022 19:46:21 +0000 Received: by mail-pj1-x1031.google.com with SMTP id u4-20020a17090a518400b00223f7eba2c4so24547695pjh.5 for ; Sat, 31 Dec 2022 11:46:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20210112.gappssmtp.com; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=gPc58Y51hCNhEryZsA9bXuU3MeyrPOLyCmpl7VCuo/k=; b=KUS+dSYRO8AdL5vcy86NT5VcXAzplOI2unDdolrvrya/PH85NBIoymjzXlkknIiPeD AYiSQukz9ug7UQZS4/FjSJ0mHyxif5iVLB5BO9H01PaMZz3y7Mr0zT4B1HoZUI5XL8YP cU/qPSjYvdXMSDQ6RGpWgPE8YWW/EvKcteUec5Sih0wISBRmFwTiJ6i5rTSIe+MiBIEW KCD30KZuTRTniY+kwX419ATxSce78XX9BYN86Z5cQK9ozYZiPslInvxzjNChmQEOPH59 lB7MhJCZt+7CpXBOR6E88INtGRO9eiwgytjfMIvmVNZbcfsHRY720jSwWVsmQtbuBK/c Dqtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gPc58Y51hCNhEryZsA9bXuU3MeyrPOLyCmpl7VCuo/k=; b=T/OWaucEA/nO4fCKV4LqqM9yS83kLIyjaxo8yZBuMV/hCdR48IYoEcl5KxsBo1WmNz P6ztT8UqSUTe4YjJQd2GhlUcUcgIPU4kna25cuKuHv3BGwQZrXC8KrwCkPVqbd5P0qgL uDJz0IckUBOJzY+uk9xwXj80tEH5iMCSjq1dbQ2ZwaufIUAiHwVfVoEGpoJic369Vd0a 6nwmuzzLYx8mk6xx167Dx4b1Dd27DlKOOFnCn9XvgRIfLRob4Gsluv/DyFSvCUo3pyoz AreY/Nkz7bF27VO2w4eOmL3uWKcg5coq0gf/WbBAfXnJg8MzG2vt6nEV9x/8Tbn0l2qb ON+g== X-Gm-Message-State: AFqh2kpuWbDrTEO1CAy5tvDa0DheYXrqGiHMrxVMqsziqiDxhLAdY4dO BYhsa+EZXr2ZpxVgzK/UO5EB/w== X-Google-Smtp-Source: AMrXdXsQAkjQ4T/t6TQaPAKNVJ97PpY7O9MQJIAvwUPW5RfsoBPlVOBWb56sJ2oU8kK2Uxf2A0hbSA== X-Received: by 2002:a05:6a20:43a1:b0:b1:d250:d08c with SMTP id i33-20020a056a2043a100b000b1d250d08cmr44966187pzl.36.1672515977104; Sat, 31 Dec 2022 11:46:17 -0800 (PST) Received: from jeff-laptop.lan (c-73-231-146-4.hsd1.ca.comcast.net. [73.231.146.4]) by smtp.gmail.com with ESMTPSA id a8-20020a17090a688800b002135e8074b1sm17207288pjd.55.2022.12.31.11.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 31 Dec 2022 11:46:16 -0800 (PST) Message-ID: Subject: Re: New strategies for freezing, advancing relfrozenxid early From: Jeff Davis To: Peter Geoghegan Cc: Matthias van de Meent , John Naylor , Andres Freund , Justin Pryzby , PostgreSQL Hackers Date: Sat, 31 Dec 2022 11:46:15 -0800 In-Reply-To: References: <20221111034455.GE16809@telsasoft.com> <20221116052023.xg7pwgvx2t3hrgaj@awork3.anarazel.de> <20221206184255.dphhpvsyovqqwfdd@awork3.anarazel.de> <9fd17e87889845d74b8e3fdac7d2748a07950a92.camel@j-davis.com> <68df596638f60989cc72680d7029f0d51ca8cc19.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2022-12-30 at 16:58 -0800, Peter Geoghegan wrote: > Following the path of freezing a page is *always* valid, by > definition. Including when there are zero freeze plans to execute, or > even zero tuples to examine in the first place -- we'll at least be > able to perform nominal freezing, no matter what. This is a much clearer description, in my opinion. Do you think this is already reflected in the comments (and I missed it)? Perhaps the comment in the "if (tuples_frozen =3D=3D 0)" branch could be something more like: "We have no freeze plans to execute, so there's no cost to following the freeze path. This is important in the case where the page is entirely frozen already, so that the page will be marked as such in the VM." I'm not even sure we really want a new concept of "nominal freezing". I think you are right to just call it a degenerate case where it can be interpreted as either freezing zero things or not freezing; and the former is convenient for us because we want to follow that code path. That would be another good way of writing the comment, in my opinion. Of course, I'm sure there are some nuances that I'm still missing. --=20 Jeff Davis PostgreSQL Contributor Team - AWS