Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9roJ-0000RM-KK for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Sep 2019 14:16:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i9roI-0004Le-H8 for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Sep 2019 14:16:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9roI-0004LX-88 for pgsql-hackers@lists.postgresql.org; Mon, 16 Sep 2019 14:16:58 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i9roF-0000U3-Ca for pgsql-hackers@postgresql.org; Mon, 16 Sep 2019 14:16:57 +0000 Received: by mail-qt1-x841.google.com with SMTP id j1so30757488qth.1 for ; Mon, 16 Sep 2019 07:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=DaPH8Vyt1b75hfCSy+/Z3o6qlWoedPPY7kKh3eGBig4=; b=c173UMtZhWe8hNSYgOUlaIuouD74CSgBF0+If2OltWAqotI4lwW+sR9gHEh08A1cyA Ox2Rvaq3ylGN27WFbvaBoCUSrM/s0Xe/pBEqZdoGsxgbRmHJZgQcy+UxuOj+3MXXKHx0 xICo59x8U3rg61ih5V58AxtbziwAz3lhU2L+h4nNVPfUn8CXBrZ432Fu/57595vgYDkw CPgDEs7l9rYxliOOzIfTg7Yib8zMOIyqUsTgT6nCCKpRHXd0FVJYfwW7JyoGLaTs/KKD zZ5tnnBYULnxzP+57/J91h5kZ5KS4mt8Aa1FgFEsTmT2pGN45K1CHXMm1mqugIX/ERbU 4Gsg== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=DaPH8Vyt1b75hfCSy+/Z3o6qlWoedPPY7kKh3eGBig4=; b=NH49MKJB+SO9Zy8dqpT4LA2GTIQxJ09DdRJoldc0iiobSnvjRD6792oKoJNfPxxj5n TjA+U3YVuiDUrilb+LbnfSU0tdSUlojFSUv+hbaU3/zV0FRaZJY46bonMJ/vQHproOYP fpVe1s8EB+xdnj6t/CfwMBy4PgTn91aJ7OikP2gLGE358lzGmbfaJMSD9rcVbUbBPCFy gI272LR9RPOY19dN8rr09CAFYCL0Au5//lYBntlZ9ftfcrIuphVOLwtAhauFj3n+t63s Ag4V/AnWyMqDIld9SxjyBHqWJm2SiexDERdzWLO9RPFFCBZMlq8PgQu8S7/sWgHvy58c XEIQ== X-Gm-Message-State: APjAAAUpu6Bu1/1gQyMDQROlOqIxIFyFIeD/bWJrcaQ7DuNBY8YRqeIx KI4Bob4YFdPUqFq0CXRJrViPnYQ3caQ= X-Google-Smtp-Source: APXvYqwpKRwip8OMIuAsjPM56D98SkWCj0Pl8B7Y+qXCz0ue3tg/4G1i/N1IEry3FiL8NOXrhdwKnQ== X-Received: by 2002:a05:6214:30d:: with SMTP id i13mr194641qvu.101.1568643068976; Mon, 16 Sep 2019 07:11:08 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([179.56.30.174]) by smtp.gmail.com with ESMTPSA id c26sm21992644qtk.93.2019.09.16.07.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 07:11:08 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id B91EF1205E5; Mon, 16 Sep 2019 11:11:06 -0300 (-03) Date: Mon, 16 Sep 2019 11:11:06 -0300 From: Alvaro Herrera To: Michael Paquier Cc: Amit Kapila , Masahiko Sawada , Craig Ringer , Ashutosh Sharma , Julien Rouhaud , Peter Geoghegan , PostgreSQL Hackers , Abhijit Menon-Sen , Peter Eisentraut , Pavan Deolasee Subject: Re: [HACKERS] [PATCH] pageinspect function to decode infomasks Message-ID: <20190916141106.GA10690@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190916134056.GB6026@paquier.xyz> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Sep-16, Michael Paquier wrote: > On Mon, Sep 16, 2019 at 11:46:16AM +0530, Amit Kapila wrote: > > I don't see much use of separating information for infomask and infomask2. > > Okay, using two separate columns leads to the attached. Any thoughts? > This also includes a fix for cases with IS_LOCKED_ONLY and UPGRADED. I like how it looks in the expected test output. Didn't review the code closely, but it looks reasonable in a quick glance. Whitespace nitpick: pgindent will do something very annoying with this: > + PG_RETURN_DATUM( > + HeapTupleGetDatum(heap_form_tuple(tupdesc, values, nulls))); I suggest to split the line in the first comma, not in the parens. > + Combined flags include for example HEAP_XMIN_FROZEN > + which is defined as a set of HEAP_XMIN_COMMITTED > + and HEAP_XMIN_INVALID. I suggest something like "Combined flags are displayed for source-level macros that take into account the value of more than one raw bit, such as HEAP_XMIN_FROZEN". (We probably don't want an exhaustive list, which becomes annoying to maintain; users can refer to the source file.) There's a typo "bites" in a comment. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services