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.96) (envelope-from ) id 1whiz6-000Nve-1F for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 07:15:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whiz4-00BSAK-1W for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 07:15:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1whiz4-00BSAC-0d for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2026 07:15:46 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1whiz3-00000000HQY-0AFl for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2026 07:15:46 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-2cad8076b01so18000985ad.2 for ; Thu, 09 Jul 2026 00:15:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783581344; x=1784186144; darn=lists.postgresql.org; h=content-transfer-encoding:content-type:mime-version:user-agent :references:in-reply-to:from:subject:cc:to:message-id:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=axQm9s3ebaAEr5cnv0OCgjLYvWNByqkzwDo+idoaF68=; b=JrUy79CfcgxSkPB9hbo4hIBH7AEAZexy7lffagDS/hTVjMwtTorYh3NOKEHY/u+uAb yklmc9cxP2QTZwxiVg6+O+YJSRFVP58VWvt9KDqDfvbHq6CBZekoJPXcBczxWKW29utu MGYIftlGEs7eGh2caQ+HmaRAk69ZAeY6RyB3AnX/4j9O+6YQGTpBglAIoUImjX+YrgMR KKaWVza1ZfUFGxYtZX7hxIG55rRnQ/CzaferpppPHVMJldZYVX1kTv6cAj4D9DMEXwgI hggd3a60pyi4yud2ZY0uZwOTm0axeaOBtPVyvbrmFD/6g2OmzKZsBfrUR0TrBL7HMzEL O9Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783581344; x=1784186144; h=content-transfer-encoding:content-type:mime-version:user-agent :references:in-reply-to:from:subject:cc:to:message-id:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=axQm9s3ebaAEr5cnv0OCgjLYvWNByqkzwDo+idoaF68=; b=cIf9TBxZplz+K2LQUXrhj2wAeWXkYWQMPsZ+HtLFYNwqAnVMI8UeLqmnJEgMN2L3tv R5y0h11MCZ/ZJCqoK2U4Wn8Mdvz1/+TamqZJstmpgan+BiMGn4f0Ziwsd8vCFEbnKVog p3qEHcmd8cVyk8g4SoVvB714Kr8BjvdU2EKWqSsdr+7uMkSWyQfxbHFZgx9ZdV2iKoCN vUA0mmzjITeno9kPNMPye1HLJ5bRKfq8zodZvqMYyZQgR6gWc0CUq/vh3Ubatea3UPGy 3dyuz2gX4OQLx+N0F97RT7VBB9dADajfig/Cj3GZbGDqGnA+pHVx/ICQcHVQ6NkGO/wz oQUQ== X-Gm-Message-State: AOJu0YzkZGwIE4N3KxxdRzm5Hd96ZHECAUgt+mPCHKKkd+bEgDaQlEzs g4ioWAZRfS9rJPLZ1Sehm1/YpYa9z3WDBjSZiuZ+XTJ5J1bMkdMUZwl7 X-Gm-Gg: AfdE7ckMd/zI0MidKuVzk+wR1yIdACtjqLiO0zBOne5jMAZWEwrFLCfbx8mGNHxNtjT XARaDFxICNVuYWwKmcCcY83a+yC07hD5p0ITsf2Wq63y5ESZphsJ9R5BH8ynLjrE5bhnKzDi5Vq vYpQ0Acra1UaNaJ9N59Vfbqi1rYDhQAObwrTwpjick0HGvx0RsJBlwhfgevmzcir7Zv3svl0Cw/ ErusQEVyv1W73I7AtMDvpStfEj+6gkNaHYbhufLshZC8wWPuUlPf8PzNCKCzXDh3b/2yFCOS1jY IKA0fxvZrDTXgFg5/WmrE1gEsRgyMa4WHXus4t316APNI4VLnK5g5e7I1a78PQcJnlx5Nn5F9zl mFYwBuATzLTVIiOKB+xA9fLCtIt6clBmmP3o7AtuNZm6sKgQVPtFLEVRa5lflni2RUKwr2lRJVO Z5m0PlONgBC6SJRWe2ysGfqZxqz90ydRDeqzrRP7crZqRc5TmMxJIQdDnZMYKZzirM1WOGYO4= X-Received: by 2002:a17:903:1b0d:b0:2c9:97a7:3289 with SMTP id d9443c01a7336-2ccea47c30cmr61645905ad.43.1783581344300; Thu, 09 Jul 2026 00:15:44 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ccc9d5c361sm38932475ad.80.2026.07.09.00.15.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jul 2026 00:15:43 -0700 (PDT) Date: Thu, 09 Jul 2026 16:15:42 +0900 (JST) Message-Id: <20260709.161542.46102955322725819.horikyota.ntt@gmail.com> To: masao.fujii@gmail.com Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Fix data checksum processing for temp relations and dropped databases From: Kyotaro Horiguchi In-Reply-To: References: User-Agent: Mew version 6.8 on Emacs 29.4 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, At Thu, 9 Jul 2026 11:24:31 +0900, Fujii Masao wrote in > I think BuildRelationList() should exclude temporary relations without > RELKIND_HAS_STORAGE(), matching the existing behavior for > non-temporary relations. Attached patch implements this. ... > fails without processing the shared catalogs, yet they are still marked > as processed. As a result, later workers skip them, and checksum > enabling can complete successfully even though the shared catalogs > were never processed. > > To fix this, we should mark the shared catalogs as processed only after > a worker completes successfully. Attached patch also implements this. > > Thoughts? The changes look functionally correct to me. A couple of minor comments: 1. In BuildRelationList(), if relations without storage should be excluded regardless of whether they are temporary or non-temporary, I would personally prefer moving the RELKIND_HAS_STORAGE() check before the persistence check. That would make the intent a bit clearer. 2. In ProcessAllDatabases(), I find it slightly easier to read if the dropped-database case is handled explicitly first, perhaps by continuing early, so that DATACHECKSUMSWORKER_SUCCESSFUL remains the default result for the normal path. I'm not completely sure whether that check should go just before or just after pgstat_progress_update_param(), though. Both are mostly matters of style, so please feel free to ignore them if you prefer the current structure. Regards, -- Kyotaro Horiguchi NTT Open Source Software Center