Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sVZnA-00AZ3Q-29 for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Jul 2024 16:52:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sVZn7-00ATlv-R3 for pgsql-hackers@arkaria.postgresql.org; Sun, 21 Jul 2024 16:52:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sVZn7-00ATlm-HS for pgsql-hackers@lists.postgresql.org; Sun, 21 Jul 2024 16:52:09 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sVZn5-000ij4-CF for pgsql-hackers@postgresql.org; Sun, 21 Jul 2024 16:52:08 +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 46LGppi4614153; Sun, 21 Jul 2024 12:51:51 -0400 From: Tom Lane To: Melanie Plageman cc: Peter Geoghegan , Heikki Linnakangas , Pg Hackers , Andres Freund , Noah Misch Subject: Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin In-reply-to: References: Comments: In-reply-to Melanie Plageman message dated "Wed, 17 Jul 2024 12:49:35 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <614151.1721580711.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sun, 21 Jul 2024 12:51:51 -0400 Message-ID: <614152.1721580711@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Melanie Plageman writes: > When I run it on my machine with some added logging, the space taken > by dead items is about 330 kB more than maintenance_work_mem (which is > set to 1 MB). I could roughly double the excess by increasing the > number of inserted tuples from 400000 to 600000. I'll do this. So, after about two days in the buildfarm, we have failure reports from this test on gull, mamba, mereswine, and copperhead. mamba is mine, and I was able to reproduce the failure in a manual run. The problem seems to be that the test simply takes too long and we hit the default 180-second timeout on one step or another. I was able to make it pass by dint of $ export PG_TEST_TIMEOUT_DEFAULT=3D1800 However, the test then took 908 seconds: $ time make installcheck PROVE_TESTS=3Dt/043_vacuum_horizon_floor.pl ... # +++ tap install-check in src/test/recovery +++ t/043_vacuum_horizon_floor.pl .. ok = All tests successful. Files=3D1, Tests=3D3, 908 wallclock secs ( 0.17 usr 0.01 sys + 21.42 cusr= 35.03 csys =3D 56.63 CPU) Result: PASS 909.26 real 22.10 user 35.21 sys This is even slower than the 027_stream_regress.pl test, which currently takes around 847 seconds on that machine. mamba, gull, and mereswine are 32-bit machines, which aside from being old and slow suffer an immediate 2x size-of-test penalty: >> # The TIDStore vacuum uses to store dead items is optimized for its tar= get >> # system. On a 32-bit system, our example requires twice as many pages = with >> # the same number of dead items per page to fill the TIDStore and trigg= er a >> # second round of index vacuuming. >> my $is_64bit =3D $node_primary->safe_psql($test_db, >> qq[SELECT typbyval FROM pg_type WHERE typname =3D 'int8';]); >> = >> my $nrows =3D $is_64bit eq 't' ? 400000 : 800000; copperhead is 64-bit but is nonetheless even slower than the other three, so the fact that it's also timing out isn't that surprising. I do not think the answer to this is to nag the respective animal owners to raise PG_TEST_TIMEOUT_DEFAULT. IMV this test is simply not worth the cycles it takes, at least not for these machines. I'm not sure whether to propose reverting it entirely or just disabling it on 32-bit hardware. I don't think we'd lose anything meaningful in test coverage if we did the latter; but that won't be enough to make copperhead happy. I am also suspicious that we'll get bad news from other very slow animals such as dikkop. I wonder if there is a less expensive way to trigger the test situation than brute-forcing things with a large index. Maybe the injection point infrastructure could help? regards, tom lane