Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnHq2-0000Gq-Vb for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Sep 2016 04:11:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bnHq1-0008Hv-7L for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Sep 2016 04:11:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnHoc-0006mH-GA for pgsql-hackers@postgresql.org; Fri, 23 Sep 2016 04:10:22 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnHoV-0001Pf-3C for pgsql-hackers@postgresql.org; Fri, 23 Sep 2016 04:10:20 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id D7952205CE; Fri, 23 Sep 2016 00:10:13 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 23 Sep 2016 00:10:13 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=3+d0V1/Y/XMn1Ov 16Z3L+KqYK5w=; b=OX9ikY3cY0PSlVWpnAezA6jducoy0THL+/BmBCfNXSCMesN 5wR6dNWyF8GG04LGfXzFDiTMvfAeK+eCAxxXwR6dtzITXJtQqXtaXvdSHeNHYnG4 /pXmpqoBsPuC1Qb51O8NjFlYs1aN1CFtVhPwrHGvpctjQ6t7M/wOf6z7AM4Y= X-Sasl-enc: 4o8Yseydb/xwDihqygHvPjKHa5qn+GXHaHTL8sGKMv2r 1474603813 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 75BC9CCE8B; Fri, 23 Sep 2016 00:10:13 -0400 (EDT) Subject: Re: pageinspect: Hash index support To: Jesper Pedersen , Michael Paquier References: <20160830170633.GA508711@alvherre.pgsql> <0f99b6b0-0e54-0f6e-9502-f8cb6f194c17@redhat.com> <3493caf5-6d50-8915-7612-bd830972f513@redhat.com> <5d64a536-cc90-ce96-b68f-5b6bd3206476@redhat.com> Cc: Ashutosh Sharma , Jeff Janes , Alvaro Herrera , PostgreSQL Hackers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <80a00b5c-56d3-dffb-8dba-edf5d2167b12@2ndquadrant.com> Date: Fri, 23 Sep 2016 00:10:12 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 9/21/16 9:30 AM, Jesper Pedersen wrote: > Attached is v5, which add basic page verification. There are still some things that I found that appear to follow the old style (btree) conventions instead the new style (brin, gin) conventions. - Rename hash_metap to hash_metapage_info. - Don't use BuildTupleFromCStrings(). (There is nothing inherently wrong with it, but why convert numbers to strings and back again when it can be done more directly.) - Documentation for hash_page_stats still has blkno argument. - In hash_metap, the magic field could be type bytea, so that it displays in hex. Or text like the brin functions. Some other comments: - hash_metap result fields spares and mapp should be arrays of integer. (Incidentally, the comment in hash.h talks about bitmaps[] but I think it means hashm_mapp[].) - As of very recently, we don't need to move pageinspect--1.5.sql to pageinspect--1.6.sql anymore. Just add pageinspect--1.5--1.6.sql. - In the documentation for hash_page_stats(), the "+" sign is misaligned. - In hash_page_items, the fields itemlen, nulls, vars are always 16, false, false. So perhaps there is no need for them. Similarly, the hash_page_stats in hash_page_stats is always 16. - The data field could be of type bytea. - Add a pointer in the documentation to the relevant header file. Bonus: - Add subsections in the documentation (general functions, B-tree functions, etc.) - Add tests. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers