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 1wDHpw-002oZe-0l for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Apr 2026 08:12:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wDHps-004rcv-0a for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Apr 2026 08:12:28 +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 1wDHpr-004rcm-2j for pgsql-bugs@lists.postgresql.org; Thu, 16 Apr 2026 08:12:27 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wDHpp-00000001Hc7-39vz for pgsql-bugs@lists.postgresql.org; Thu, 16 Apr 2026 08:12:26 +0000 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2b24fdac394so69898965ad.3 for ; Thu, 16 Apr 2026 01:12:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776327145; cv=none; d=google.com; s=arc-20240605; b=MNb12dgtq9ccDKUkLNyDriWx+01hx+UrynQiLjDCmiOzGr+lvHIimdpZ98sJQgOxxF uMXs83PVd6dNWLRTZ031rZCqqrgFK3Ht+tRtybhUosFFc24+ual/XkDxYvqAKoV0pq0F c9hc+dr6GTgkC4R68wDs8zEQK/UjUrpL/dhO/BxG+C/K86oyDrHc5KMr/ka3wK/ZRMFL 654eHYhreUeDI+VVwT9am+v6H+wDyJfhAMlzGQRGzphwlsHzAKbPp2IWdT+Qo5rz9D9F r5jasueRBSj0P95G12I6N8FBAOhQPcHS3EUlIC/32bmMQobHqpmD3HEEtP1NlXY8Bg9E DbXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Ecp2QDdF7UBgTefGy6h++46lZoXPVnD8fn9DtcF4Iws=; fh=eq4N0ZJ8hrEgR38nsBqR0qT98+sD9swSO80XeCQALy8=; b=H//FiGrBXTMpKpwj28rWkE0m5PFxPTXLtM9t+TXOjtFz+b3ZRIZQrvRq00liRKpVAu /C12OigA8If5j8WaQGd+UjFAslo4a0cwNvXkdh9kMilg4eh5754u2PHs82WaQ90wHQaG 4f8mfWTdYFzs4/vhk3j4/1PDiaGkNDI4LglSs4Qc7BFjqbzC1IOHsJehTdGXlfBHBknl NAmda7h7SephHdbMOWak/AvJihPdLxFk4DwzDbBTd0Dh+3S7+XUeGCgPwbi5IzuK5Ic6 drj44AMqu5+Mqt8X0WNGzxth5aeH8Ck6RnKYwp0G4i7Nzp0HPoWkEvOV9jtETHF1YobZ gzMg==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776327145; x=1776931945; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ecp2QDdF7UBgTefGy6h++46lZoXPVnD8fn9DtcF4Iws=; b=oI4U1USLNN9yhVRHzskPxokHGd+KZ3JwxMEoP7xZF/OyIFJ29UWuLrNx3ty2Ghpcxj 3FmB5pPvCpXleMSvo1SRpCeFFIwPGWfmF2YL9C6wvpZgtZ3sBYmIcQwMU/dLw3GrYeT0 Gf5N5klnl0VlfppgYqaVAuMuLBLKllxmT6qErdNIEBNCv1IxwP/EgI5QSG9XGW3Hp3w8 ySV4/vbETeahRHP9sp8wNVo1ja9zot+DrN+NEGEWy0K7qVzdSeP/m8FtHb1g8FmdAVtP v09S4qmPIrNuDw0HC/hsIOA6+ccG+hogmrqh1yePQJ/gtazwBIA1CnRc2mbNF5tropXW 7W9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776327145; x=1776931945; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Ecp2QDdF7UBgTefGy6h++46lZoXPVnD8fn9DtcF4Iws=; b=VZ1K/gZALDqZemCf1jWdySA4RvSxU36Erwxm9WPLyeGLE8K9lSDQt+nKt49V0H/CjJ lXaU1nSUSp3W8cDQEYriE/LyhmI8UPUDR4rmfQ25/H661PO9d7J4xc9P8R2IUx3te1Eb pqWmqGVOiXgzz1qmWY3sxd+yqQ7ehUOav9gsXR0wNHwLhHeiaxEzmZeZQlY8I0Q6iiMT PQjqQQkLtEK1DrcqMS1vWgfhMHs6xWOQIjM5pSPrrT2uP4QV9fFl19pqar6wcP/P16ru dtPTruVKc3mrJ0ChX/x3fH+wmznS8m3+ivbEpRbf+VmN8I6teO1yhJ4HuEokK2+V423S 3fGA== X-Gm-Message-State: AOJu0YzLoi8f4mM1zWCtI3p+zTiHcPyKFg4JGMrlKbKuDmN+UbI+ITuL mk/dnWZ4fYDUuIpxsjC6cLXC/d+xBR4ZAdEAh+O32wUI2gL/BdKEan72qvCrx8iqPCKMgN9Jhex iyDjskG2SC8NAMBTtfqEk3MrMeIYeLeM= X-Gm-Gg: AeBDieuD/DAuBqCyir+Phn4u25HZ8wMu4ZFDPjwrKYvzy7xa56XVTD6R6kMTlaCAAyk qZbrCLJQTmlAO1zvFkVZ+ks72RFzb0UlkWP0I9vrGN274uH1wgwdnzPUOOFVg8texuHw5w2HJY6 cAyAa7Ea1lLLOI2Zoy7XW8NioGYcblKJtOom28qckaNd062ciGMjpEXG9/Zgtt+87vGlPpcfRo6 4ZsEexzlETJ6TMYR6O2FLJ3VAt0TX0PxSsAZumn8TACn4jmI3cjRbGQylG00UJ9a48CfvuNHZ+p /yqG6MifeZ6HlMMXoNk= X-Received: by 2002:a17:90a:d607:b0:35d:a90d:580e with SMTP id 98e67ed59e1d1-35e428856dfmr27137833a91.23.1776327145193; Thu, 16 Apr 2026 01:12:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Masahiko Sawada Date: Thu, 16 Apr 2026 01:11:47 -0700 X-Gm-Features: AQROBzCjPVp9o_i6nnkIVXBvu5upbTMDYTf3509ug92sdyIM87TQzRPw32ioo-Y Message-ID: Subject: Re: TRAP: failed Assert("offsets[i] > offsets[i - 1]"), File: "tidstore.c" To: Andrei Lepikhov Cc: PostgreSQL mailing lists Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 16, 2026 at 12:13=E2=80=AFAM Andrei Lepikhov wrote: > > On 15/04/2026 22:50, Masahiko Sawada wrote: > > On Wed, Apr 15, 2026 at 5:48=E2=80=AFAM Andrei Lepikhov wrote: > > Could you provide the reproducer of the assertion failure? IIRC there > > have not been such reports on the community so far and the test should > > be included in the patch anyway. > Sure! See in attachment. Thank you for updating the patch. IIUC the assertion failure could happen only where we do random TIDs test like below because it's not guaranteed that the offset numbers in the array after applying DISTICT are sorted. -- 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; 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. Regards, --=20 Masahiko Sawada Amazon Web Services: https://aws.amazon.com