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 1s83ul-009NFa-5x for pgsql-hackers@arkaria.postgresql.org; Fri, 17 May 2024 20:10:52 +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 1s83ul-00HOy5-7r for pgsql-hackers@arkaria.postgresql.org; Fri, 17 May 2024 20:10:51 +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.94.2) (envelope-from ) id 1s83uk-00HOx6-UP for pgsql-hackers@lists.postgresql.org; Fri, 17 May 2024 20:10:50 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s83ui-000iFc-4h for pgsql-hackers@lists.postgresql.org; Fri, 17 May 2024 20:10:49 +0000 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1f05b669b6cso19593445ad.3 for ; Fri, 17 May 2024 13:10:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1715976647; x=1716581447; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xPZmnA0gJ6oc8VU3ZoKlYpI2XScX/JT/17Q3HSQTJNg=; b=TcigvvbKhhuov4ovKNxV4BZeCrOAoZ3xbhzO+s9p8OGNK5A+dbT3uYuQ8skm+dy+EY Y/hgZqihjw0jyAxMBVfgpJFNNKFbEUtz+M2YfhlMm+iFiArXIT/MJbScaavPMPNXDHyh HUBsrJdY3Uetjc6vwPgR9/ogE0CYAsm+8Tn0kZAFAt2xktT8GdLD5NXgeXTIh3aUlFd2 bX6tTL8+V3Ng7ieF55yNwQjJsQiqWSqoaQ2jDPS14jZSeBT30Vqv/U8d34SB+zcO2wGj cRj3/WbpLM9/YhUggdy07hM/W0AiwfminMIki7Rhrg8BskE2stqvJ8LNPR5JYBbA6ajZ r28A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715976647; x=1716581447; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xPZmnA0gJ6oc8VU3ZoKlYpI2XScX/JT/17Q3HSQTJNg=; b=bcS1mSTfee+nQdYJ2rQFJnQd1hEOlMWgU+GyMQfWELyjFeydJHpUpyRGH17JD6/X52 va+OKWXaunS3QntFlFNzsG9uk8SsPvM/xZVqps2eyXLz2IkwBfmjYQ1JDBiff000QzgV 4lCX4r0OZcEeupwpxsSeMAXnWzWU+X7G7ek74QYXFQWe+VpRPXd6hqx9CSIdIDdRPaTN rPZYu/WVK3MULRvylpm1MacdZlTmgcsbYicirnVGgZT6wU2xE/3n/1rm11qFoxs7e71d EFz+p+wzbnsrHCB2n8ChLGwMV8KZmA3/ceRZ9bN4T8s7SoRG8ia65gVK9uNdUTIvPu6z p23Q== X-Forwarded-Encrypted: i=1; AJvYcCWFvelvJwgG/+DDPwNLTKqK/Pneruca/F3drLKkJkKCFolI9OiJleuwWUO1hNUqXmIgY495fDwRBMLWSquIMLdENSh2g9YCeytn3F8o8aSE+Mjl X-Gm-Message-State: AOJu0YzkgH3/prbZoSJDxSjELdC5mgQkv8lCBUEieVqzioCL6A8nY8wZ g65qlcGNrHmKCf7zuyH9dH2L0HzEc5lYfOQWjNJwyGgZGPNKjq4RK85rBLOzDA== X-Google-Smtp-Source: AGHT+IHSBluART5XTkIE9BzEKK52H7H7/BEQT5gejh0tQNG2RN8jtYM/bgbOkowBDuzJ0vNFD02IFQ== X-Received: by 2002:a05:6a20:6a24:b0:1af:ccd8:c118 with SMTP id adf61e73a8af0-1afde0d52bdmr25132588637.22.1715976647111; Fri, 17 May 2024 13:10:47 -0700 (PDT) Received: from smtpclient.apple (24-113-197-127.wavecable.com. [24.113.197.127]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2b3026bsm15064943b3a.202.2024.05.17.13.10.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 May 2024 13:10:46 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6.1.1\)) Subject: Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index. From: Mark Dilger In-Reply-To: Date: Fri, 17 May 2024 13:10:46 -0700 Cc: Pavel Borisov , Alexander Korotkov , Tom Lane , Noah Misch , Peter Eisentraut , Aleksander Alekseev , Postgres hackers , Maxim Orlov , Andres Freund , Greg Stark , Julien Rouhaud , David Steele , Maxim Orlov , lubennikovaav@gmail.com Content-Transfer-Encoding: quoted-printable Message-Id: <4BBFF6D5-58EE-40B3-A770-9BA2F46A1C69@enterprisedb.com> References: <20220922151328.lakwdytvwnyyif3b@awork3.anarazel.de> <8c74cc5e-4b97-4cd7-9aaf-67886822a78c@eisentraut.org> <20240501022412.85@rfd.leadboat.com> <1375614.1715301775@sss.pgh.pa.us> <8635D8B1-45B7-4D67-86C7-D6ECB4F10B11@enterprisedb.com> <2EDAC2EB-E8C2-4B56-9094-288ABD45DA4E@enterprisedb.com> <28FCD9E5-795E-44F4-ADFA-DBCAC1945DA1@enterprisedb.com> <65DAA5C7-457C-4BF8-ACAF-43E931A67BA0@enterprisedb.com> To: Peter Geoghegan X-Mailer: Apple Mail (2.3731.700.6.1.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On May 17, 2024, at 1:00 PM, Peter Geoghegan wrote: >=20 > Many different parts of the B-Tree code will fight against allowing > duplicates of the same value to span multiple leaf pages -- this is > especially true for unique indexes.=20 The quick-and-dirty TAP test I wrote this morning is intended to = introduce duplicates across page boundaries, not to test for ones that = got there by normal database activity. In other words, the TAP test = forcibly corrupts the index by changing a value on one side of a = boundary to be equal to the value on the other side of the boundary. = Prior to the corrupting action the values were all unique. =E2=80=94 Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company