Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uvh0t-00HSki-2F for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Sep 2025 18:54:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uvh0s-006yvC-6U for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Sep 2025 18:54:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uvh0r-006yv4-TY for pgsql-hackers@lists.postgresql.org; Mon, 08 Sep 2025 18:54:50 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uvh0o-001FhL-2b for pgsql-hackers@lists.postgresql.org; Mon, 08 Sep 2025 18:54:50 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-b04ba58a84fso315499166b.2 for ; Mon, 08 Sep 2025 11:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757357686; x=1757962486; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=g0O8BW9ynd5asXBOf5utdGLRZY1Fk7WkjGC9/C2126s=; b=gxuaA91XXJUJAfUE0wA6KkA4QgKiGKQZMu1cikMCtyahAhAyyF0bOREpk5ON6XO/ta lLw9z8K2RnqzbV6QmykNCLvxj2rKUXWmDWmkt9Gs1/Oe2ICS+CHIQzQCLlUff+Yw/UtL 0tB11NzzLAn1egLC61BX2WJPYWWz53ci2ZgFkI11lM8m6Tw0M06E8gQBwe9NRXpvaW0X svESCy3B7y9xGWrXPX+cNUhQRWeZr+4FWYnOFicTejBYQtVUl2u9oalASpzvSWzIH9uh 9bgNCyVzN9JV8Ip3jcXOCS95WR7tsg6Q0GYdVf3sbCpf9SqfIppF/EXk/eWaXl6g9ywj VB2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757357686; x=1757962486; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g0O8BW9ynd5asXBOf5utdGLRZY1Fk7WkjGC9/C2126s=; b=xM2+b3kHxs3xMtgOZ4L6/RG0GaNcYDse8h3xHlnb8yOLaujzSS7s2AS2aYuyC4Pvtt WndoymZPJey3oPkZzyAmBwizi8UzPjFuDryao0B4ZQLBZ9sJ3RBVcRPOwzK8ITJPoJkX WZm8oZVfw1aZcqeRJX/pinkPIzHNJONN9WSpjKekxh8O3Cper2YsndDdgD4nBPkxCKY0 h5kR/PJLNWz1RibkGoyt7DN9OVoltKFTfvCSADra6eUW1VHSJVusVOzFMaDxGsVYXg33 mAItjeOTuWzKtCch4d9pnpkcNPZiP4rPj7XMdj5s84QGZvPJS0aG6Vces13SjqajfMbQ Bdgw== X-Forwarded-Encrypted: i=1; AJvYcCUWx82Vzl2Dvvg2KqWTrq5cJ40jsJTvtetsRi0pWMwa2WDDcrL8euVWL/g6ENuQGy8dU3r9ZaMzBsyvQkNE@lists.postgresql.org X-Gm-Message-State: AOJu0YxAmhiJReC+LgFc0vXjnApDubQBlzVDxCChjl1T3Pi2jB887AQI KEIHxYsgTfeWvp0FNW7EP50XFhC3lo7mFwh/9F1BbmgKWgCYG5AXq/uFFYGfuk7scnEtfvqVVcS RIg5ePfPCHzMK5NE+jkeMhSFyaK5uRVw= X-Gm-Gg: ASbGnctEGYUqxVgmI6MJrQBjfB5oHw31U51mFR0yeCJbcSMyJOxfJ2scZL9JyZJDE2V zM+Cf569txtfcRMals/kSmGbGieRpWlwLrMnisltWeLgcIeK8PkYd5egG1eM4uN1jDd/fUoCqTq qVR6VA+Ht9gM8uqdpIDg1P1tx0cduGdMZP92lybOpxPl8lVx6zekYBSiB9twtkG+8n5WVV/gP9C 1xPohxF X-Google-Smtp-Source: AGHT+IGD68GUtzHpM6EzjFWqXxVysa6txdbk0DJJrue+zw8o8p0y+83YWiiGFYq76YFNyBrPDW/pa5r61gj54qKOxJA= X-Received: by 2002:a17:907:3cc1:b0:b04:31c6:a43a with SMTP id a640c23a62f3a-b04b1697db1mr876221766b.41.1757357686182; Mon, 08 Sep 2025 11:54:46 -0700 (PDT) MIME-Version: 1.0 References: <87DD95AA-274F-4F4F-BAD9-7738E5B1F905@yandex-team.ru> In-Reply-To: From: Robert Haas Date: Mon, 8 Sep 2025 14:54:34 -0400 X-Gm-Features: Ac12FXw3sEJVwLCYHKb3tve_ihr5QObqL2sHruASA-DF8ceUKAkxfeMw-FYdbCc Message-ID: Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) To: Melanie Plageman Cc: Andres Freund , Kirill Reshke , Andrey Borodin , PostgreSQL Hackers , Heikki Linnakangas Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Sep 8, 2025 at 11:44=E2=80=AFAM Melanie Plageman wrote: > I pushed this, so rebased v10 is attached. I've added one new patch: > 0002 adds ERRCODE_DATA_CORRUPTED to the existing log messages about > VM/data corruption in vacuum. Andrey Borodin earlier suggested this, > and I had neglected to include it. Writing "ereport(WARNING, (errcode(ERRCODE_DATA_CORRUPTED)" is very much a minority position. Generally the call to errcode() is on the following line. I think the commit message could use a bit of work, too. The first sentence heavily duplicates the second and the fourth, and the third sentence isn't sufficiently well-connected to the rest to make it clear why you're restating this general principle in this commit message. Perhaps something like: Add error codes when VACUUM discovers VM corruption Commit fd6ec93bf890314ac694dc8a7f3c45702ecc1bbd and other previous work has established the principle that when an error is potentially reachable in case of on-disk corruption, but is not expected to be reached otherwise, ERRCODE_DATA_CORRUPTED should be used. This allows log monitoring software to search for evidence of corruption by filtering on the error code. That kibitzing aside, I think this is pretty clearly the right thing to do. -- Robert Haas EDB: http://www.enterprisedb.com