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 1i8kH2-0005yn-VL for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2019 12:02:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8kH1-0007te-S7 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Sep 2019 12:01:59 +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 1i8kH1-0007tX-Dr for pgsql-hackers@lists.postgresql.org; Fri, 13 Sep 2019 12:01:59 +0000 Received: from mail-qt1-x842.google.com ([2607:f8b0:4864:20::842]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8kGu-0001tR-EI for pgsql-hackers@postgresql.org; Fri, 13 Sep 2019 12:01:59 +0000 Received: by mail-qt1-x842.google.com with SMTP id r15so33494375qtn.12 for ; Fri, 13 Sep 2019 05:01:52 -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=aEIzdf1fmvJD8CYHeOojl/RrvZsUZ9grgq9xJfZj3Xc=; b=O3JJW5+myMtY56wseJnAJ1ZfLz/spyAfDk/MisOmu+pcWrjHdS0v8rPmTy0o1s0up4 OLmjcw4uWw3FiG6qn7hAAeGlVPSKmE39JX+4dCxJ+zsemOvmmrSahEwthQRCtIw0vDEp 2NQFERLESLtWHXY3+6IPsdY/MPUbHR10HdgGwo3JOcYj619kc+XRrXbh8DRWBKRGZUKe Ltz05aqBCh6KNR3mtWy4kTE/3t8lg97c0jXDOWkatuRF+qd7Uotq523Ilr4MrjRON7Ky AibLyObtjZb9mioMS7f6eq22Rh/CiDo+vhA5qmiZz9u1pC0b3X2uaQDCKDehY5h3IPb7 Fpxw== 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=aEIzdf1fmvJD8CYHeOojl/RrvZsUZ9grgq9xJfZj3Xc=; b=WKTF9TUSgOJsU0uMPBQ4A7QcqTfPpnOkXP8zqBi1R+PZYlEJKlCvojptMlLF1YtVBD hybN7ARi21fR8QtuZi+9YuHHKT6mtBCPdnSry9MJLnWDQVtbTwq1fLzSIErwQ3zmZ23y 7F5eCa6AH41ZJYq+gQeuy/zjvRK9wvi6wldLuDVad2JjEF7yKk9HprPYh+ecq3zqd/cU X85DFkueEuTEDBxFF3lx4OcIF7E4pweInHEbA3QzzrUKWyLZ/NWz6VN6pGhn2Gy//1ov 6FLYXI8GcFXAVqIoDpBeAcikG90YcJBzdj8vuI3lVQDMUx9k+z0Xy9dsEFwpcd5y7Qn7 bczA== X-Gm-Message-State: APjAAAWEFyxltttA56NyP8+xDImgRArPL3RAejnJU9MterlvIC9iOA8h 6r1zhhgjFfw5gutudEcAmzCtww== X-Google-Smtp-Source: APXvYqzZzQ7uOdhso8yd/Z23UpSpJWluvhjvDWuovEEJMIq9cVXKE0CRU5825bdF50P08KDs3B0zWg== X-Received: by 2002:ad4:5149:: with SMTP id g9mr30947878qvq.115.1568376110991; Fri, 13 Sep 2019 05:01:50 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([191.125.99.73]) by smtp.gmail.com with ESMTPSA id w126sm12376118qkd.68.2019.09.13.05.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2019 05:01:50 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id A21311205F1; Fri, 13 Sep 2019 08:49:50 -0300 (-03) Date: Fri, 13 Sep 2019 08:49:50 -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: <20190913114950.GA3824@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190913051222.GE2285@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-13, Michael Paquier wrote: > Attached is a patch to fix your suggestions. This also removes the > use of HEAP_XMAX_IS_LOCKED_ONLY which did not make completely sense > either as a "raw" flag. While on it, the order of the flags can be > improved to match more the order of htup_details.h A thought I had as I fell asleep last night is to include the derivate flags in a separate output column altogether. So heap_tuple_infomask_flags() could be made to return two columns, one with the straight one-flag-per-bit, and another one with the compound flags. That way we always have the raw ones available, and we avoid any confusion about strange cases such as LOCK_UPGRADED and IS_LOCKED_ONLY. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services