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 1mYBAX-00071Z-5K for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Oct 2021 17:57:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYBAW-0008An-2I for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Oct 2021 17:57:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYBAV-00089i-Dp for pgsql-hackers@lists.postgresql.org; Wed, 06 Oct 2021 17:57:27 +0000 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mYBAR-00082V-J7 for pgsql-hackers@postgresql.org; Wed, 06 Oct 2021 17:57:26 +0000 Received: by mail-pj1-x1029.google.com with SMTP id k23-20020a17090a591700b001976d2db364so3002000pji.2 for ; Wed, 06 Oct 2021 10:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=r5frX0cARSpyT/Qa3gOxdGyRDkFChpTYMrzHHt4Ysv4=; b=LyaF4ueiYHmbWfx9XA5hat3N1qFPByhUqKTTEJXpWwmWpLiIH6AlF2HFJGJTfwSmWh DbQojSPCjDlQ2AY4c0XfyzkxnlRVM1dTdyGrTMU0l48r4999kPUSb9jzp2lb8Q6b1DMA JIcpw0+13pzOJMNYSVdTJMJ6j9dZx9NbEvrZ1q7drSI/+jzT9WGT3i/gJd0wVSnmuk5b 0hEgdMt/DDkAIqkpsBJ4Puy4Zfo3hbbNPNV7qhBYUQXHTtqJax8Kh87QlEemo+5mNaaN BbGVzLE7Dv99836ar1LNLK1trYbeSY7Kk6uSVO9aL7rWvhmD4LLB3CCKxNsqDDvJHddt rb/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=r5frX0cARSpyT/Qa3gOxdGyRDkFChpTYMrzHHt4Ysv4=; b=hH3qf8/d/drLZsdTXxhN6OupU4aq56uc1v4MwLiQaE+UFQjO0q85F8UXyMM7aZGkor lJ7lPXV02zEkzNtMrKitc6zwJ2MFZK/g/QY2DTc6jxnjWZGpuIaBGZuikHcrLwEhBhoY rvcJSJkZ+evRSkqGghr6H+UwC3KZnXiQISFHf0K7ALuVVkc9OTanEZpKh7/sefO1jIBP p62rHQCEAy6OooO8628j3BLGxLG5hqLFB0OwAuvtO5lhc3ar6R/5R6/ELX+tvzn3PmxV 2MSuUntcM55aNZdxF4F9wNpsba/c2GFqDKzdDtgNQ/+nrcTWyZI6ON8UMV1wPTQ9P4HV DVAA== X-Gm-Message-State: AOAM530f1g29RxA1qPrP+pkRF/wrTHK7l3KxMsFMwHI55Xus30mXfWTC dxY8qQJ642RydL+VXa1oi76XgmVLEuR5yofyBXE37tUT1ToIjxz/vDIL/nUUQw5V4ZSQ9FYi5tR bhfHEtlgP4yycWsCYwejaXicPmBbvjviBYC0muCJutiMjjAFApXfLmUX3Y1cyvKw6HlWA23qJ9t IAlNdE2L+c5aP8zfHmeI5FYJXm7m0PV1//8cx4 X-Google-Smtp-Source: ABdhPJxMygBPgGq+u5HQuCmJSC/7yPAN64xOkdyQx65FEWj/MccE7+lC0N8Tjp2ilOCEYKn54fzeUg== X-Received: by 2002:a17:902:654d:b0:13e:a097:208e with SMTP id d13-20020a170902654d00b0013ea097208emr12298328pln.31.1633543041770; Wed, 06 Oct 2021 10:57:21 -0700 (PDT) Received: from laptop280-ma-us.hitronhub.home (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id i12sm21598605pgd.56.2021.10.06.10.57.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Oct 2021 10:57:21 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: BUG #17212: pg_amcheck fails on checking temporary relations From: Mark Dilger In-Reply-To: Date: Wed, 6 Oct 2021 10:57:20 -0700 Cc: Pavel Borisov , Alexander Lakhin , Robert Haas , PostgreSQL-development Content-Transfer-Encoding: quoted-printable Message-Id: <561CE3DB-5CBC-44BF-9A3E-1D7FAEB123E0@enterprisedb.com> References: <17212-34dd4a1d6bba98bf@postgresql.org> <28B36E41-1E8F-4DC1-A924-711621BA4972@enterprisedb.com> <386F66EE-DEFD-42EA-9DB2-102BF3414669@enterprisedb.com> <63FF68F5-683D-423E-A667-9C00441101A5@enterprisedb.com> To: Peter Geoghegan X-Mailer: Apple Mail (2.3608.120.23.2.7) X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Oct 6, 2021, at 10:39 AM, Peter Geoghegan wrote: >=20 >> The differences in the upcoming version are >>=20 >> 1) --all no longer means "all relations" but rather "all checkable = relations" >=20 > Clearly pg_amcheck never checked all relations, because it never > checked indexes that are not B-Tree indexes. I'm pretty sure that I > can poke big holes in almost any positivist statement like that with > little effort. There is a distinction here that you are (intentionally?) failing to = acknowledge. On the one hand, there are relation types that cannot be = checked because no checking functions for them exist. (Hash, gin, gist, = etc.) On the other hand, there are relations which could be check but = for the current state of the system, or could be checked in some = particular way but for the current state of the system. One of those = has to do with code that doesn't exist, and the other has to do with the = state of the system. I'm only talking about the second. >=20 >> 2) checking options should be automatically downgraded under = circumstances where they cannot be applied >> 3) unlogged relations during replication are by definition not = corrupt >>=20 >> I think #1 and #3 are unsurprising enough that they need no = documentation update. #2 is slightly surprising (at least to me) so I = updated the docs for it. >=20 > To me #2 sounds like a tautology. It could almost be phrased as > "pg_amcheck does not check the things that it cannot check". I totally disagree. It is uncomfortable to me that `pg_amcheck = --parent-check` will now silently not perform the parent check that was = explicitly requested. That reported an error before, and now it just = downgrades the check. This is hardly tautological. I'm only willing to = post a patch with that change because I can see a practical argument = that somebody might run that as a cron job and they don't want the cron = job failing when the database happens to go into recovery. But again, = not at all tautological. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company