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 1owr5E-0001pU-4C for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Nov 2022 20:38:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1owr4D-0003pM-SO for pgsql-hackers@arkaria.postgresql.org; Sun, 20 Nov 2022 20:37:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1owr4D-0003pB-JZ for pgsql-hackers@lists.postgresql.org; Sun, 20 Nov 2022 20:37:29 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1owr4B-0003x9-75 for pgsql-hackers@lists.postgresql.org; Sun, 20 Nov 2022 20:37:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2AKKbQh72892136 for ; Sun, 20 Nov 2022 15:37:26 -0500 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Unstable regression test for contrib/pageinspect MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2892134.1668976646.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 20 Nov 2022 15:37:26 -0500 Message-ID: <2892135.1668976646@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk My very slow buildfarm animal mamba has failed pageinspect several times [1][2][3][4] with this symptom: diff -U3 /home/buildfarm/bf-data/HEAD/pgsql.build/contrib/pageinspect/expe= cted/page.out /home/buildfarm/bf-data/HEAD/pgsql.build/contrib/pageinspect= /results/page.out --- /home/buildfarm/bf-data/HEAD/pgsql.build/contrib/pageinspect/expected/= page.out 2022-11-20 10:12:51.780935488 -0500 +++ /home/buildfarm/bf-data/HEAD/pgsql.build/contrib/pageinspect/results/p= age.out 2022-11-20 14:00:25.818743985 -0500 @@ -92,9 +92,9 @@ SELECT t_infomask, t_infomask2, raw_flags, combined_flags FROM heap_page_items(get_raw_page('test1', 0)), LATERAL heap_tuple_infomask_flags(t_infomask, t_infomask2); - t_infomask | t_infomask2 | raw_flags = | combined_flags = -------------+-------------+----------------------------------------------= -------------+-------------------- - 2816 | 2 | {HEAP_XMIN_COMMITTED,HEAP_XMIN_INVALID,HEAP_X= MAX_INVALID} | {HEAP_XMIN_FROZEN} + t_infomask | t_infomask2 | raw_flags | com= bined_flags = +------------+-------------+-----------------------------------------+----= ------------ + 2304 | 2 | {HEAP_XMIN_COMMITTED,HEAP_XMAX_INVALID} | {} (1 row) = -- tests for decoding of combined flags It's not hard to guess what the problem is here: the immediately preceding bit is hopelessly optimistic. -- If we freeze the only tuple on test1, the infomask should -- always be the same in all test runs. VACUUM (FREEZE, DISABLE_PAGE_SKIPPING) test1; The fact that you asked for a freeze doesn't mean you'll get a freeze. I suppose that a background auto-analyze is holding back global xmin so that the tuple doesn't actually get frozen. The core reloptions.sql and vacuum.sql tests are two places that are also using this option, but they are applying it to temp tables, which I think makes it safe (and the lack of failures, seeing that they run within parallel test groups, reinforces that). Can we apply that idea in pageinspect? contrib/amcheck and contrib/pg_visibility are also using DISABLE_PAGE_SKIPPING, so I wonder if they have similar hazards. I haven't seen them fall over, though. regards, tom lane [1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dmamba&dt=3D2= 022-11-20%2015%3A13%3A19 [2] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dmamba&dt=3D2= 022-10-31%2013%3A33%3A35 [3] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dmamba&dt=3D2= 022-10-19%2016%3A34%3A07 [4] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dmamba&dt=3D2= 022-08-29%2017%3A49%3A02