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 1rLqMS-000qB6-H4 for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jan 2024 20:00:09 +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 1rLqMR-003aXp-LG for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jan 2024 20:00:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rLqMR-003aXh-Bh for pgsql-hackers@lists.postgresql.org; Fri, 05 Jan 2024 20:00:07 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rLqMO-0002gr-Em for pgsql-hackers@lists.postgresql.org; Fri, 05 Jan 2024 20:00:06 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50e741123acso2229326e87.0 for ; Fri, 05 Jan 2024 12:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704484803; x=1705089603; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+koHjE0eiz2o8UUXDyWL+x7fuXo5J6biKYL/RpaNHjg=; b=e/gjc3cN7glIKYHv2T7EnpGmyZLPybVphqYIQ7nu/X016Wcsts7yfVo8y9wA627seY G5uhqVYMY+U03fnzDE0atmZCcW5MWfyIGzcw6BcpnPkkAxJTOSQSaN5J33w/m005WA73 RvDyzp6PztkWfbO2Aj/Jb/BRjqzPHH82XUPSUrMr9DCba7HRTTz8TfCZ68tgHei7HJWk KfCEBYY6iQRiOPk8BNTiCeK0E7pTzaE0C5F+fSzaGGXvSpmFRV1QtR5OM6zSCqAad3l6 AEUL3ohQ3XBQIYgxiZPQpXtskXqnYfmJZaRouU+29nyU5bstE5Rb9gif5p1qo/0wKBGx 2xzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704484803; x=1705089603; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+koHjE0eiz2o8UUXDyWL+x7fuXo5J6biKYL/RpaNHjg=; b=KqhwvySl4ZxknXmmvPMmaio9pYAn8YqqYXZtucAgJymp5ZeR9Q7lhg0+CT2+dpT4Tz rHfvW+dzevlNRzor55y6sEoVBtUbORj4+pfz5NptC8cFDLlulaFOLR/HvgZy21c0EVxQ 2SO+lFf8V2AZXi6KjEvbOf9X6nmcgvuLYt+3AjL71vznuVQckvM5rK95OXxKfHyGXxs4 S2F5hdURgjxWu4frx/tD96bbsjVXVXUirlp0WEbiGsoZFU6EbZUsV0bteqINJS+Q6IHL LU37mXXkEFIH4a2mNbz8Y0iAkLBMs1fL6sPLXMnjlkW3wq7Rdb1XpPFuGoUt8RlJvohZ J2eQ== X-Gm-Message-State: AOJu0YzS6a6VzN1nYbWT05D0UOk1V3cT6gwck1jFGSgTxJpI/KtwwwiM PdciUM47l1KpSzbcMjf3LgGQg7kOhVbfew== X-Google-Smtp-Source: AGHT+IHFaCJJjOInbbHxzNBz/VKnJPgC1THJci2kPQ+82MRO7CTPdrgTDJuldnD5KSPjO1lEvC7y6A== X-Received: by 2002:a05:6512:2385:b0:50e:7f0c:7914 with SMTP id c5-20020a056512238500b0050e7f0c7914mr1760080lfv.21.1704484803196; Fri, 05 Jan 2024 12:00:03 -0800 (PST) Received: from [1.0.0.7] ([91.185.77.50]) by smtp.gmail.com with ESMTPSA id b2-20020ac25622000000b0050e6bf65b2asm313437lff.288.2024.01.05.12.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jan 2024 12:00:02 -0800 (PST) Message-ID: <2d39b5fa-ba90-48c8-4cde-ecba4a62fa3b@gmail.com> Date: Fri, 5 Jan 2024 23:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Add a perl function in Cluster.pm to generate WAL Content-Language: en-US To: Michael Paquier Cc: Tom Lane , Euler Taveira , Bharath Rupireddy , Kyotaro Horiguchi , Alvaro Herrera , Andrew Dunstan , pgsql-hackers@lists.postgresql.org References: <3a6978d6-e4fc-4014-b5f7-45db53d8fa53@app.fastmail.com> <5d160064-8cbe-4b32-9c55-c983b1f63b12@app.fastmail.com> <370894.1704325169@sss.pgh.pa.us> <2e203472-72b5-1b55-377a-824c3f28b190@gmail.com> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 05.01.2024 02:48, Michael Paquier wrote: > On Thu, Jan 04, 2024 at 04:00:01PM +0300, Alexander Lakhin wrote: >> Reproduced here. > Did you just make the run slow enough to show the failure with > valgrind? Yes, I just run several test instances (with no extra modifications) under Valgrind with parallel as follows: for i in `seq 20`; do cp -r src/test/recovery/ src/test/recovery_$i/; sed "s|src/test/recovery|src/test/recovery_$i|" -i src/test/recovery_$i/Makefile; done for i in `seq 20`; do echo "iteration $i"; parallel --halt now,fail=1 -j20 --linebuffer --tag PROVE_TESTS="t/035*" NO_TEMP_INSTALL=1 make check -s -C src/test/recovery_{} PROVE_FLAGS="--timer" ::: `seq 20` || break; done The test run fails for me on iterations 9, 8, 14 like so: ... iteration 9 ... 5 5       #   Failed test 'inactiveslot slot invalidation is logged with vacuum on pg_authid' 5       #   at t/035_standby_logical_decoding.pl line 224. 5 5       #   Failed test 'activeslot slot invalidation is logged with vacuum on pg_authid' 5       #   at t/035_standby_logical_decoding.pl line 229. 13      [07:35:53] t/035_standby_logical_decoding.pl .. ok   432930 ms ( 0.02 usr  0.00 sys + 292.08 cusr 13.05 csys = 305.15 CPU) 13      [07:35:53] 13      All tests successful. ... I've also reproduced it without Valgrind in a VM with CPU slowed down to 5% (on iterations 2, 5, 4), where average test duration is about 800 sec: 4 4       #   Failed test 'inactiveslot slot invalidation is logged with vacuum on pg_authid' 4       #   at t/035_standby_logical_decoding.pl line 222. 4 4       #   Failed test 'activeslot slot invalidation is logged with vacuum on pg_authid' 4       #   at t/035_standby_logical_decoding.pl line 227. 6       [15:16:53] t/035_standby_logical_decoding.pl .. ok   763168 ms ( 0.68 usr  0.10 sys + 19.55 cusr 102.59 csys = 122.92 CPU) > >> As I can see in the failure logs you referenced, the first problem is: >> #   Failed test 'inactiveslot slot invalidation is logged with vacuum on pg_authid' >> #   at t/035_standby_logical_decoding.pl line 224. >> It reminded me of: >> https://www.postgresql.org/message-id/b2a1f7d0-7629-72c0-2da7-e9c4e336b010%40gmail.com >> >> It seems that it's not something new, and maybe that my analysis is still >> valid. If so, VACUUM FREEZE/autovacuum = off should fix the issue. > Not sure about that yet. > Your suspicion was proved right. After git show c161ab74f src/test/recovery/t/035_standby_logical_decoding.pl  | git apply -R 20 iterations with 20 tests in parallel performed successfully for me (twice). So it looks like c161ab74f really made the things worse. Best regards, Alexander