Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhhl1-00078A-Pw for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Aug 2017 19:44:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dhhl1-00082u-AX for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Aug 2017 19:44:07 +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 1dhhjL-0004wS-7g for pgsql-hackers@postgresql.org; Tue, 15 Aug 2017 19:42:23 +0000 Received: from mail-wr0-x233.google.com ([2a00:1450:400c:c0c::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dhhjE-00020y-4M for pgsql-hackers@postgresql.org; Tue, 15 Aug 2017 19:42:22 +0000 Received: by mail-wr0-x233.google.com with SMTP id x43so6188224wrb.3 for ; Tue, 15 Aug 2017 12:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=WFYi/vMJ9GRcvCJtjZzuoYHJmvRK5ulztojMQ3ttAkk=; b=k+nR3KH82uPC0hiMADz3ni9kFkCRbX3tV1eHIlVeaYttfu68i+ZMctgnJu+Dzkvk3/ 7CSjlOnY8DZ0mqtPDweU2+n4MEd6E+77hK4bszPJ8Z0EI2Eqq3PSEYKM5upZK6DK+Db7 0sfvVL+Ry3QJBP2MHrLiuI3bMfTgpxTEx133wV9RU/4Sb8+5f3xCqgz0L++IfI0Gtzgz VRDMgyyxw5aNGV4fdSwz0xzvYwlSdFMI6g3tZ777+/J+qgZ4apAsL6aFuZfzCzqVtGcM ICPoKXr27eC1oBIvQ5I7FTKHsrTyZzKEjVPoqFc//7kNbeQXYn43mUZhATvYrGNfZJXV XDEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WFYi/vMJ9GRcvCJtjZzuoYHJmvRK5ulztojMQ3ttAkk=; b=UIw6IEVzI+4dwvyBvIZPf1o2QMHszaI6MAg9vzh3Nse6x9RPkN3VeFGNJdWBgPlGPL stTg0raaWoCEjFE7NA3KtgVgPrGHEZ+taAN/4uOmaT+f6RiC9PfcZU8PZOFdMY943Gmw FTWI55py1glh9kLnO+KtzlVGBBSKxa5Ai+QSaI/AfPk9lUJznUb76/GU6HrWXzgxPQVq sF87Gmahw/hIOniKYwph1Y2K+BRF3BIMLtjilvYLtvgS2iVYEfDuVWYhdv4Wx7FNSpPj ueTFrbj5ppUVswbSahQI+eROauYzJndaQTFf8IZNGemSuZQc/f3FujbCUjaI67w3TmbU U11A== X-Gm-Message-State: AHYfb5hsvw+W14Hnor8eoMh9X95u0Ok0Pwnw968/GZGc6/mZJaPayH4o bYuZZa7suXl4n+v23BecALB35AycJueyeIDyZOECXgn+QFa6O8RvngKJAz5+jwK6Y1XHoTVI0Ah 6Y3nD0vFPomG8g0cxBchsEc75ptb+YlvVbK6lC4Xgh69lvdpRbl0xeD2+GNnVyN+cL+wStGeiMT U= X-Received: by 10.223.198.9 with SMTP id n9mr4533360wrg.185.1502826133802; Tue, 15 Aug 2017 12:42:13 -0700 (PDT) Received: from [10.137.2.17] (ip-89-177-46-65.net.upcbroadband.cz. [89.177.46.65]) by smtp.gmail.com with ESMTPSA id y73sm2961234wmh.46.2017.08.15.12.42.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Aug 2017 12:42:13 -0700 (PDT) Subject: Re: [PATCH] pageinspect function to decode infomasks To: Robert Haas Cc: "pgsql-hackers@postgresql.org" References: <005801d31563$748c6560$5da53020$@lab.ntt.co.jp> From: Tomas Vondra Message-ID: Date: Tue, 15 Aug 2017 21:42:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 08/15/2017 07:54 PM, Robert Haas wrote: > On Tue, Aug 15, 2017 at 9:59 AM, Tomas Vondra > wrote: >>> I don't think so -- the "committed" and "invalid" meanings are >>> effectively canceled when the "frozen" mask is present. >>> >>> I mean, "committed" and "invalid" contradict each other... >> >> FWIW I agree with Craig - the functions should output the masks raw, without >> any filtering. The reason is that when you're investigating data corruption >> or unexpected behavior, all this is very useful when reasoning about what >> might (not) have happened. >> >> Or at least make the filtering optional. > > I don't think "filtering" is the right way to think about it. It's > just labeling each combination of bits with the meaning appropriate to > that combination of bits. > > I mean, if you were displaying the contents of a CLOG entry, would you > want the value 3 to be displayed as COMMITTED ABORTED SUBCOMMITTED > because TRANSACTION_STATUS_COMMITTED|TRANSACTION_STATUS_ABORTED == > TRANSACTION_STATUS_SUB_COMMITTED? > > I realize that you may be used to thinking of the HEAP_XMIN_COMMITTED > and HEAP_XMAX_COMMITTED bits as two separate bits, but that's not > really true any more. They're a 2-bit field that can have one of four > values: committed, aborted, frozen, or none of the above. > All I'm saying is that having the complete information (knowing which bits are actually set in the bitmask) is valuable when reasoning about how you might have gotten to the current state. Which I think is what Craig is after. What I think we should not do is interpret the bitmasks (omitting some of the information) assuming all the bits were set correctly. regards -- Tomas Vondra 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