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 1wDI45-002ov6-2R for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Apr 2026 08:27:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wDI35-004vDk-07 for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Apr 2026 08:26:07 +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.96) (envelope-from ) id 1wDI34-004vDb-2X for pgsql-bugs@lists.postgresql.org; Thu, 16 Apr 2026 08:26:06 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wDI32-00000001NJn-2EqQ for pgsql-bugs@lists.postgresql.org; Thu, 16 Apr 2026 08:26:06 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-488b00ed86fso77937025e9.3 for ; Thu, 16 Apr 2026 01:26:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776327963; x=1776932763; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PfvG8JDTZBJ2E6+VI6Kg5MYgxzl6llNlBFwtGjfvLE4=; b=qADEaZobSLMz4YJU+eV2jreU1pOBXT+doiZZNXveequZk+d71Z9I5MY50SDahgJl2P sVrPx0RJ6MGvyeaNhnCkypIXgK4sZsIPbBDIMPOabMcOCcBGruJ8nJEmokwrecOs9rLs HPMk7oyUIeq5d0WeCKfsBZ/MnQdkuPT74zNNFtspk6HEctO0ZFYBC4mNbMWlLF4iYiK3 eC242o3UkFYhdJOx8hRLfuPzxOrO5jdGOftBatRw4XCE/+MkSees+E8ivQy7BvlWOndu ZF+duoaKfcUMjqI73SAqqJ37gJesrotf3JC973siXZ5dbKZrVlLsHjSr7RzsSTnxVVVc TDvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776327963; x=1776932763; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PfvG8JDTZBJ2E6+VI6Kg5MYgxzl6llNlBFwtGjfvLE4=; b=M9bq73WzbROCuKOX6Im+O1nKK/zchL3WYf3knRs5y56QI9L91yYseEP1XI4PpJi6PA J/Rr6XsrYXjF26T31Fsa5k4v4pqMs9Cq6ZXcPXLmkkZptTMSmDeydiYJl4ozfA7W1QJM 8MndkT2/1Nzeu583s48TTxgLoB7NNSQjPSSdMBaB/4MERWgUl/pN/GLY3Zy7MsvLetOV kIIkjVJu5MSOtILWeO4Ch6lO3gH2u2pxhWlMB5aHWCCiG0C7NHHhtIJzvgbFWq+QZoNx fjqiflsWUzXIbgcBGNTgKLABQDzXk6ssVYRpP7fSWrNAE5Y6FUimRxxyfBjZsd8Xs45m 3upQ== X-Gm-Message-State: AOJu0YxmVMAoeeiqVBKoqa/5PKIiTYlTYOcjlFU1pZC+RUu6l0vkmpPB 9MqJ3JTmJMcDX25jDOwUsS75XuwoeqD++fB3R0vfSvBXihMFPGJxwWP3 X-Gm-Gg: AeBDieuLgRUW/YadjVLxvDYNTqtike27Z8lHqQiM+xiJ10QjNUNtNXztrnmTWM7GgME KL+1UpB9yE4q254Gzmp9t+Qx7gJ+KmNcVK8LNuwALnGgjGntLZ606pHQGfetTBSVKoPJt8nRksb N7URNi+5lO/D28XIWpE1Nw+ABfEOk0/+Jy3WuZds/VY5QgTAqoeCVSYdYUkDFZ9OZFoFVJKqGOM 08eOrjyBr8YvMAVKuqfRJvT4uD8Oq3jnCLWuT52MHLYT5sACWwHp53971+msXUrykaEtsgrH2a6 0EQvmlnQcy6EVSTdid0MLceyzuuPH7WVUukMnZy0RTKZwyPuDVVkojtDvg5GGqOGjHb+0D2T0HB ryjxSQuBhI9ibhSdQsInSIp/6OmPm0sPgiUJTp0c3vYfh3ET1jMvSnqOTRYhD11/Zc/K9iWoMFV Oy1fqQmHEwi6+b6ebWW4NQtMLJ//RykrGRysiYVA== X-Received: by 2002:a05:600c:4715:b0:488:9e54:94c0 with SMTP id 5b1f17b1804b1-488d67e7dd4mr364639205e9.8.1776327962670; Thu, 16 Apr 2026 01:26:02 -0700 (PDT) Received: from [192.168.15.160] ([80.251.191.198]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488f5818d70sm58423985e9.4.2026.04.16.01.26.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Apr 2026 01:26:02 -0700 (PDT) Message-ID: <119bd418-1d7a-42c7-9270-86f3b6696399@gmail.com> Date: Thu, 16 Apr 2026 10:26:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: TRAP: failed Assert("offsets[i] > offsets[i - 1]"), File: "tidstore.c" To: Masahiko Sawada Cc: PostgreSQL mailing lists References: Content-Language: en-US From: Andrei Lepikhov In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 16/04/2026 10:11, Masahiko Sawada wrote: > On Thu, Apr 16, 2026 at 12:13 AM Andrei Lepikhov wrote: > -- Random TIDs test. The offset numbers are randomized and must be -- > unique and ordered. INSERT INTO hideblocks (blockno) SELECT > do_set_block_offsets(blkno, array_agg(DISTINCT greatest((random() * > :maxoffset)::int, 1))::int2[]) FROM generate_series(1, 100) > num_offsets, generate_series(1000, 1100, 1) blkno GROUP BY blkno; Alright, I used an explicit sort in reverse order to make sure the test is stable. I usually create modules that may change different paths, costs, and orders, and using random can make things unpredictable. But for this specific test, I don't see any risk. > > While I agree that we need to sort the offset numbers, I think it > would be better to make sure the offset numbers in the array to be > sorted in a test_tidstore.sql file where required, instead of doing so > for all cases. I'm not sure I follow. Are you saying that do_set_block_offsets shouldn't sort the incoming offsets? I made this change mainly to meet the TidStoreSetBlockOffsets contract. Since this is just a simple test, performance isn't really a concern. -- regards, Andrei Lepikhov, pgEdge