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 1rTGC8-001UDO-LH for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jan 2024 07:00:09 +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 1rTGC7-00Ak4a-PS for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jan 2024 07:00:07 +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 1rTGC7-00Ak4S-Gq for pgsql-bugs@lists.postgresql.org; Fri, 26 Jan 2024 07:00:07 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rTGC4-003Qln-Mf for pgsql-bugs@postgresql.org; Fri, 26 Jan 2024 07:00:06 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-50f11e3ba3aso87727e87.1 for ; Thu, 25 Jan 2024 23:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706252403; x=1706857203; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=j4aT0wc1WLzhBm4HQL7/njilfWEzuE2O1IP7fU9pC8M=; b=XT14K5AZezfqysssmC98nurA/GL9X7NssDPldCiNUzZ+Oymh62yAoa4cYdZldMcsy1 oOtNIPKkSP+zec1FKCq0eg2VSWIj0kheS1gnbIYrWnLFbAiN7FiBnqX+nZtIFNeLSRJ0 y879rcMwcL+vXWPu8JiPMyb47+GNJl8WOxFSS5dgRjW6mqogAG6DDtHWb78awxZn8X2q 0BcJxvQwSS2U+uRTXjZ9gDOgVC9kgnKjgL9PDHuKxbs0eu0aNjTKIEN5i0z56K+O6Co5 WGLv+NeI/MayAV6UJscjvpBY+OO50wNngfEeWGYJcEWrPeKrN3ivmI77fpibHa8Cn96m V1tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706252403; x=1706857203; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=j4aT0wc1WLzhBm4HQL7/njilfWEzuE2O1IP7fU9pC8M=; b=t7/1LosodiYxN313BRFK2a1rT6wFQvdI1AIWyxCAzG6Fm5b2VfggU5z79a5EPXbcDe lg0RMByLSnPBkxV99McpPGuYNwBajTrc2XYnE6CIbz2KE8HvoOBMS8FWFafHmPEXTqb3 WTkDlbspRXVT2Q0K8449UOwTtui4rOvrSNsFEZJphfHzdDG9YiqMiRDvPHM9QaAZ6EZd MdlI1X2Vy9Ki3pAtD3Aq/ZI1ZKmWfk3GfZgoHQI4OwxMtjvA07cPcDNrABE4wfzv7JtP zJX7VyNNu0mUb7dLi8amxA6r5ysLaeKMFmz/K+n7YBsNCWUiGgctea7xqCe0ydxhYwKI YFpw== X-Gm-Message-State: AOJu0YzOcteLSuK764la3CWfal1kNWwsy+iELwo65vyVvkoowlkEno0M ZDGm1oBMLgtOGppBfaRClSDQKUEcoU/YSu6qeeQ7gKbMWhyp/6gT X-Google-Smtp-Source: AGHT+IHoT0XP4eJREkhDL5H7R7yrnGU5QQLJq/LjHeUDqvvI7h+XlJ9dmi/UKSgWAUu7fZyDz+zICw== X-Received: by 2002:a05:6512:48a:b0:50e:504e:6c34 with SMTP id v10-20020a056512048a00b0050e504e6c34mr972368lfq.3.1706252402732; Thu, 25 Jan 2024 23:00:02 -0800 (PST) Received: from [1.0.0.7] ([91.185.77.50]) by smtp.gmail.com with ESMTPSA id r6-20020ac252a6000000b00510133c07b9sm90500lfm.55.2024.01.25.23.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 23:00:02 -0800 (PST) Message-ID: <0b535249-a00c-a38a-85f6-d5a38c62dd55@gmail.com> Date: Fri, 26 Jan 2024 10:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [BUG] false positive in bt_index_check in case of short 4B varlena datum Content-Language: en-US To: "Andrey M. Borodin" Cc: Michael Zhilin , pgsql-bugs@postgresql.org, Yura Sokolov References: <7bdbe559-d61a-4ae4-a6e1-48abdf3024cc@postgrespro.ru> <0FDE2089-D306-4CBB-AD1F-EC4B419E3B33@yandex-team.ru> <49BBA065-4C9A-4E50-9048-B457907FF219@yandex-team.ru> <76bc0dc9-4e43-4cd8-8eec-249b254ed1c9@postgrespro.ru> <8C83FCCA-2548-499A-8B1C-96C3D8ADB787@yandex-team.ru> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Andrey, 23.01.2024 21:09, Andrey M. Borodin wrote: > PFA draft fixes for both this errors. Alexander, Michael, Jian, what do you think? > > I did not touch anything in first step - fix for original bug in this thread. However, I think that comments from Jian He worth incorporating into the fix. > I''m confused by a NOTICE added, as it printed now even for cases, which worked before, for example: CREATE TABLE t(f1 text); CREATE INDEX idx ON t(f1); INSERT INTO t VALUES(repeat('1234567890', 1000)); SELECT bt_index_check('idx', true); NOTICE:  Index contain tuples that cannot fit into index page, if toasted with current toast policy  bt_index_check ---------------- (1 row) Best regards, Alexander