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 1m1QrS-0000r6-Kz for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Jul 2021 10:02:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1QrR-00013S-IR for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Jul 2021 10:02:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1QrQ-00013K-Rk for pgsql-hackers@lists.postgresql.org; Thu, 08 Jul 2021 10:02:25 +0000 Received: from mail-177131.yeah.net ([123.58.177.131]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1QrL-0004rS-A5 for pgsql-hackers@postgresql.org; Thu, 08 Jul 2021 10:02:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yeah.net; s=s110527; h=Subject:From:Message-ID:Date:MIME-Version; bh=fuwzq 0uQocpKAuNR5l7AgNOx59al7nWEafDZi4Idytc=; b=WCvj5kmnd6DBHaUdfm3hO 0FCD+qdP7MYToo3s0nubc1hrsf0Vg9AsjxolbQsiJ0t4WCjqtK+3oUMnvqmfVVt2 FhBR79mu6bbITOUjinEz0ee3R6wl5lSMQxuN1caNaSRG/bJvrajFuW0547LJ7mRv hsD+WdB3zRYWall2drGv3s= Received: from quanzl-macbook.local (unknown [221.238.132.226]) by smtp1 (Coremail) with SMTP id ClUQrAD3_y8bzeZg8JjBQA--.40344S2; Thu, 08 Jul 2021 18:02:05 +0800 (CST) Subject: Re: bugfix: when the blocksize is 32k, the function page_header of pageinspect returns negative numbers. To: Michael Paquier , Justin Pryzby Cc: Bharath Rupireddy , pgsql-hackers@postgresql.org References: <8b8ec36e-61fe-14f9-005d-07bc85aa4eed@yeah.net> <20210708042806.GA22043@telsasoft.com> From: Quan Zongliang Message-ID: Date: Thu, 8 Jul 2021 18:02:03 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CM-TRANSID: ClUQrAD3_y8bzeZg8JjBQA--.40344S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKw1kWF48tw4fZFWfCw1Utrb_yoWDKFb_ua 4qqwn7A34UKFWfuFs8trsxXFZ5KayYga1jvws8XrZ8A34UXrs5GFZrKrZrCws5JrWSkFsa vFZIqa1SvrZI9jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUYJWrJUUUUU== X-Originating-IP: [221.238.132.226] X-CM-SenderInfo: htxd06xrqjzxxdqjq5hhdkh0dhw/1tbiFh3JJF6NjdR+ggAAsQ List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/7/8 3:54 下午, Michael Paquier wrote: > On Wed, Jul 07, 2021 at 11:28:06PM -0500, Justin Pryzby wrote: >> 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 > > Yes, thanks. Peter's recent work is what I had in mind. I agree that > we could improve the situation, and the change is not complicated once > you know what needs to be done. It needs to be done as follows: > - Create a new pageinspect--1.9--1.10.sql. > - Provide a proper implementation for older extension version based on > the output parameter types, with a lookup at the TupleDesc for the > function to adapt. > - Add tests to sql/oldextversions.sql to stress the old function based > on smallint results. > - Bump pageinspect.control. > > Quan, would you like to produce a patch? That's a good exercise to > understand how the maintenance of extensions is done. Ok. I'll do it. > -- > Michael >