Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Le4-0004w9-6P for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Jul 2021 04:28:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1Le2-0001DZ-QH for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Jul 2021 04:28:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1Le2-0001DK-Es for pgsql-hackers@lists.postgresql.org; Thu, 08 Jul 2021 04:28:14 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m1Ldx-0001fW-I6 for pgsql-hackers@postgresql.org; Thu, 08 Jul 2021 04:28:13 +0000 Received: by mail-io1-xd33.google.com with SMTP id k16so6562511ios.10 for ; Wed, 07 Jul 2021 21:28:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/eHbzGlAJJ8XmZFNXa1km4WF2Yno2JRmtq608XiAM7g=; b=ta8TG9/nAcmuRFZUqkRoLI+zyfrhZOWUVlydBElFMu3nKtisSdLt76sDCVD8l1k4nq bzlhleVsKV2WKHNed37MUmx3j9AWE20wMQvDiClFuMLqtOgHqrY4QpaGjLlP7neF1ZW2 XmQmqspNZppye2SkOZ1PkxeiEjnaTISoItLS06w6IbzxYMqeVCr9XhUHlUmiF8w4hwSq 325GKrRt0odkVtiFMnQifC08dkSz0mbxwhtZTeNg89NbngDgtmRiCMCqzLN0Q80lFBDM AaqJbWQ5cdt6uXFH/WKD5/Uy1j3TYczpMqw7hblmPxguvE75OrjUAJilP7Pble+xDuxc rctw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/eHbzGlAJJ8XmZFNXa1km4WF2Yno2JRmtq608XiAM7g=; b=EhJU2I4eHIP6XeCg1924KZGi3GO7REp0aZ0i7XEGXRpDPk8ypgVHfFcd+aHe2jahv0 x0vT/B7DUKdBDR1PhzKxx2TZB/+JTSZEk8bS4knATv69DU5Zil3NtwZQl74knvABOriu DHKC8QE7klXIYLGvvyYDuzPTIYbg+pNwicQpm7+s8T8W7SE5aGYJsCDtt5BICv87zZD+ D8rSDUVbHHWoAdL5+W0oop6/MNyf+N/N+WSmSoW51GY6h1eQMifjifBZ+AI+zMbK1oau upUSQxjKyh9EeZVMO72xbx4j0m0h//wKv0GSrKh6ZzVLkqhZTgvey1liEkpYlbRZRaw3 SQpQ== X-Gm-Message-State: AOAM533oKGoLdf/+UDp6ZnlotXXJ4USPQ90T8+K7KkBa02sHAfT7BFmf v2xvXWUqGrW2LJcD3JmjOY1Wbw== X-Google-Smtp-Source: ABdhPJwJYhWNzATzZr1deabv/IJDJYMz1V4ANStDQ1n8PoA2BBCJtg2ujcYSkiSZuApD5DNE/p756g== X-Received: by 2002:a5d:91cc:: with SMTP id k12mr22491544ior.103.1625718488508; Wed, 07 Jul 2021 21:28:08 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id x1sm526321ioa.54.2021.07.07.21.28.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Jul 2021 21:28:08 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id F39A18015F3; Wed, 7 Jul 2021 23:28:06 -0500 (CDT) Date: Wed, 7 Jul 2021 23:28:06 -0500 From: Justin Pryzby To: Michael Paquier Cc: Bharath Rupireddy , Quan Zongliang , pgsql-hackers@postgresql.org Subject: Re: bugfix: when the blocksize is 32k, the function page_header of pageinspect returns negative numbers. Message-ID: <20210708042806.GA22043@telsasoft.com> References: <8b8ec36e-61fe-14f9-005d-07bc85aa4eed@yeah.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 Date: Tue Jan 19 10:28:05 2021 +0100 pageinspect: Change block number arguments to bigint -- Justin