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 1sovnf-00EtKD-0j for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2024 02:12:44 +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 1sovnd-00795b-6F for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2024 02:12:41 +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.94.2) (envelope-from ) id 1sovnc-00795T-S1 for pgsql-hackers@lists.postgresql.org; Fri, 13 Sep 2024 02:12:40 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sovnV-000uVG-Hi for pgsql-hackers@postgresql.org; Fri, 13 Sep 2024 02:12:40 +0000 Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-82a109bc459so92513139f.1 for ; Thu, 12 Sep 2024 19:12:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726193553; x=1726798353; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SP0BR0y+FaOeVcCMoLzBkFgusZTIFwSFQhG26iSz27g=; b=DCR5GMUO14TcQ/b7LN7ktFs0+ZSfjPL1EJh9rdrPUDXbijSNDkN8KiqgsIznJbJvkU Dcjeyo/qMjUZOgyIYKla6lT3RVCy11FpS74zzgZfAP+51rV4UnDM3GP/EvTFtVMPfCB0 TcALTtaT3Vyg/aq/swUq6R85ID5hTAlz/iFpeSqOZSIDE44q42p89Vrf4kOFJrLoEDLL riI6tgln9eB8JNaV3B3GzS0hjRMf2oYMTblIv29Wh3fcXGMH2/bhKRrM2W4GTSoGlShD PF9c12rdTEnKO69vIlup3cLF72xhvzKu8TMYBn/OruvyxxQ+YlIW+r/BYEJF8DJe+LmF IcsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726193553; x=1726798353; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SP0BR0y+FaOeVcCMoLzBkFgusZTIFwSFQhG26iSz27g=; b=g6y3t0+MyI8tg8s+v5qu4EmK8f/oZX/wVPmWUO22IOsWsQ2EPI4MLztyJ8Qq+2XfKl J3xUqgF7PkgXU9YMOXjF2Ev7GmYtjE9tZQi008m1abd3XBnKSXly6u07kN8mtsLbEgZ6 3wyIBEJtWYLoSG+lwhVD3I/hwhbWp2+j9sgPgKRFstYYNhrji0ecviQCKH53830xL1aG NBaiHdrL5+Kucsb34pk2Yqge1ES+oH85yhJnCUHeMaYW1MIGHOjk+IMR4fwhkJhUPQzR WSqphiepF3vodw3UtfDt7XvQrDo7B5/yE33b3Pl/V0X5OPZzViejvrX91hOdJnYkHIcg Kk7A== X-Forwarded-Encrypted: i=1; AJvYcCX9Y5+j14tBrFSp3s9xU7uhmedY/RU1pJW2WpQWqJ+KjWutz/w+TR/H9dF1Ri1Gue7X0VHu3ZrsRqjqGp+R@postgresql.org X-Gm-Message-State: AOJu0YzEljt8Uv51vNzARlVqmbydtt7xGtMglPT939ISBu3jV/QhhN2m sFgjzD7/KdpQ4V3p6YD1JAUC/Hv2tYzCFTsu8zRIWh4L2IH9/CPs X-Google-Smtp-Source: AGHT+IGUqNoVL+CiocycXzpf7d/wBB88NUvYWX7gIm+MY0TXJNflZ6NCZvclz9SFyJS0XCaRfK22pA== X-Received: by 2002:a05:6e02:1d13:b0:39d:4dab:a533 with SMTP id e9e14a558f8ab-3a074bf1abbmr60175665ab.0.1726193552732; Thu, 12 Sep 2024 19:12:32 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4d35f8fae64sm930675173.147.2024.09.12.19.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2024 19:12:31 -0700 (PDT) Date: Thu, 12 Sep 2024 21:12:29 -0500 From: Nathan Bossart To: Michael Paquier Cc: Matthias van de Meent , Robert Haas , Ayush Vatsa , PostgreSQL Hackers Subject: Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ccDEccsyTIPDjiIw" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --ccDEccsyTIPDjiIw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 12, 2024 at 08:42:09PM -0500, Nathan Bossart wrote: > Oh, the answer seems to be commits aeaaf52 and 47a22dc. In short, we can't > use a temporary sequence in this test for versions older than v15. Here's a patch to make the sequence permanent and to make the output of tuple_data_split() not depend on endianness. -- nathan --ccDEccsyTIPDjiIw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fix_pageinspect_test.patch" diff --git a/contrib/pageinspect/expected/page.out b/contrib/pageinspect/expected/page.out index 04fd9dee4b..3fd3869c82 100644 --- a/contrib/pageinspect/expected/page.out +++ b/contrib/pageinspect/expected/page.out @@ -240,11 +240,12 @@ SELECT page_checksum(decode(repeat('00', :block_size), 'hex'), 1); (1 row) -- tests for sequences -create temporary sequence test_sequence; +create sequence test_sequence start 72057594037927937; select tuple_data_split('test_sequence'::regclass, t_data, t_infomask, t_infomask2, t_bits) from heap_page_items(get_raw_page('test_sequence', 0)); tuple_data_split ------------------------------------------------------- - {"\\x0100000000000000","\\x0000000000000000","\\x00"} + {"\\x0100000000000001","\\x0000000000000000","\\x00"} (1 row) +drop sequence test_sequence; diff --git a/contrib/pageinspect/sql/page.sql b/contrib/pageinspect/sql/page.sql index 59784fc7cc..346e4ee142 100644 --- a/contrib/pageinspect/sql/page.sql +++ b/contrib/pageinspect/sql/page.sql @@ -100,6 +100,7 @@ SELECT page_header(decode(repeat('00', :block_size), 'hex')); SELECT page_checksum(decode(repeat('00', :block_size), 'hex'), 1); -- tests for sequences -create temporary sequence test_sequence; +create sequence test_sequence start 72057594037927937; select tuple_data_split('test_sequence'::regclass, t_data, t_infomask, t_infomask2, t_bits) from heap_page_items(get_raw_page('test_sequence', 0)); +drop sequence test_sequence; --ccDEccsyTIPDjiIw--