pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Nathan Bossart <nathandbossart@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Ayush Vatsa <ayushvatsa1810@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch
Date: Thu, 12 Sep 2024 21:12:29 -0500
Message-ID: <ZuOfjemYJfjpio2u@nathan> (raw )
In-Reply-To: <ZuOYcb9hYfMNaHRD@nathan >
References: <CAEze2WiNB=wjrtQGERk2mmkpOZevGCfTT7ei6guJsFG4VRmacA@mail.gmail.com >
<Ztd0VcV2PQJf5jUJ@nathan >
<ZuH_PB1S3JuWvNPq@nathan >
<CAEze2Wh_KkMthGmGiW+v9hFN90L066Vt3VQdEFmwmi03CgFRkA@mail.gmail.com >
<ZuJPlHWN6HOO9AYD@paquier.xyz >
<ZuNfgqVMc2O9XQN6@nathan >
<ZuOKOut5hhDlf_bP@nathan >
<ZuOLqG5zXKEB9ICg@paquier.xyz >
<ZuON2ERKm9nvkOYo@nathan >
<ZuOYcb9hYfMNaHRD@nathan >
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
Attachments:
fix_pageinspect_test.patch (text/plain, 1.5K) download
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;
view thread (29+ messages) latest in thread
Message-ID: <ZuOfjemYJfjpio2u@nathan>
Permalink: ../ZuOfjemYJfjpio2u@nathan/
Also on: postgresql.org/message-id/ZuOfjemYJfjpio2u@nathan
copy link · copy postgr.es · copy git am
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, michael@paquier.xyz, boekewurm+postgres@gmail.com, robertmhaas@gmail.com, ayushvatsa1810@gmail.com
Subject: Re: Pgstattuple on Sequences: Seeking Community Feedback on Potential Patch
In-Reply-To: <ZuOfjemYJfjpio2u@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox