pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: Quan Zongliang <quanzongliang@yeah.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: bugfix: when the blocksize is 32k, the function page_header of pageinspect returns negative numbers.
Date: Wed, 7 Jul 2021 23:28:06 -0500
Message-ID: <20210708042806.GA22043@telsasoft.com> (raw)
In-Reply-To: <YOZ70IxyhdGzn6OE@paquier.xyz>
References: <8b8ec36e-61fe-14f9-005d-07bc85aa4eed@yeah.net>
	<CALj2ACVvmn7RsV9BmXLKv9M-7WZtabyyALECsY_iKbz4Cj1VtA@mail.gmail.com>
	<YOZ70IxyhdGzn6OE@paquier.xyz>

On Thu, Jul 08, 2021 at 01:15:12PM +0900, Michael Paquier wrote:
> On Thu, Jul 08, 2021 at 09:12:26AM +0530, Bharath Rupireddy wrote:
> > +1. int32 makes sense because the maximum allowed block size is 32768
> > and smallint with range -32768 to +32767 can't hold it. Internally,
> > lower, upper, special are treated as unit16. I looked at the patch,
> > how about using "int4" instead of just "int", just for readability?
> > And, do we need to change in pageinspect--1.1--1.2.sql and
> > pageinspect--1.0--1.1.sql along with pageinspect--1.5.sql?
> 
> Changes in the object set of an extension requires a new SQL script
> that changes the objects to reflect the change.  So, in this case,
> what you need to do is to create pageinspect--1.9--1.10.sql, assuming
> that the new extension version is 1.10 and change page_header()
> accordingly.

I think it's common (and preferred) for changes in extension versions to be
"folded" together within a major release of postgres.  Since v1.9 is new in
pg14 (commit 756ab2912), this change can be included in the same, new version.

> You also need to be careful about compatibility with past versions of
> this extension, as the code you are changing to use int8 could be used
> at runtime by older versions of pageinspect where int4 is used.  I
> would suggest to test that with some new extra tests in
> oldextversions.sql.

I think you can refer to this prior commit for guidance.

commit f18aa1b203930ed28cfe42e82d3418ae6277576d
Author: Peter Eisentraut <peter@eisentraut.org>
Date:   Tue Jan 19 10:28:05 2021 +0100

    pageinspect: Change block number arguments to bigint

-- 
Justin





view thread (17+ messages)  latest in thread

Message-ID: <20210708042806.GA22043@telsasoft.com>
Permalink:  ../20210708042806.GA22043@telsasoft.com/
Also on:    postgresql.org/message-id/20210708042806.GA22043@telsasoft.com

 · 

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: pryzby@telsasoft.com, michael@paquier.xyz, bharath.rupireddyforpostgres@gmail.com, quanzongliang@yeah.net
  Subject: Re: bugfix: when the blocksize is 32k, the function page_header of pageinspect returns negative numbers.
  In-Reply-To: <20210708042806.GA22043@telsasoft.com>

* 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