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 1rl02N-00GyDd-8z for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Mar 2024 05:23:23 +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 1rl02L-0062UP-SD for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Mar 2024 05:23:22 +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 1rl02L-0062UG-IW for pgsql-hackers@lists.postgresql.org; Fri, 15 Mar 2024 05:23:22 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rl02H-004aGE-Tz for pgsql-hackers@lists.postgresql.org; Fri, 15 Mar 2024 05:23:20 +0000 Received: from [192.168.68.63] (125-236-186-114.jetstream.xtra.co.nz [125.236.186.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id F1AEB54667; Fri, 15 Mar 2024 05:23:17 +0000 (UTC) Message-ID: <89f477dc-c3e5-412e-9765-61c214aa69ab@pgmasters.net> Date: Fri, 15 Mar 2024 18:23:15 +1300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add basic tests for the low-level backup method. To: Michael Paquier Cc: pgsql-hackers@lists.postgresql.org References: <03e4cf19-fb76-4891-accc-edd429a25b21@pgmasters.net> <431ecc5d-8c07-4ee1-b05e-3ca536e606bb@pgmasters.net> <4980aba2-9cd4-4bd6-b2e1-e873639ab7ee@pgmasters.net> <1c85f906-85d4-4479-9791-062989fec352@pgmasters.net> Content-Language: en-US From: David Steele In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 3/15/24 12:38, Michael Paquier wrote: > On Fri, Mar 15, 2024 at 09:40:38AM +1300, David Steele wrote: >> Is the missing test in meson the reason we did not see test failures for >> Windows in CI? > > The test has to be listed in src/test/recovery/meson.build or the CI > would ignore it. Right -- I will keep this in mind for the future. >>> The second LOG is something that can be acted on. I've added some >>> debugging to the parsing of the backup_label file in the backend, and >>> noticed that the first fscanf() for START WAL LOCATION is failing >>> because the last %c is detected as \r rather than \n. Tweaking the >>> contents stored from pg_backend_stop() with a sed won't help, because >>> the issue is that we write the CRLFs with append_to_file, and the >>> startup process cannot cope with that. The simplest method I can >>> think of is to use binmode, as of the attached. >> >> Yeah, that makes sense. > > I am wondering if there is a better trick here that would not require > changes in the backend to make the backup_label parsing more flexible, > though. Well, this is what we recommend in the docs, i.e. using bin mode to save backup_label, so it seems OK to me. >>> I am attaching an updated patch with all that fixed, which is stable >>> in the CI and any tests I've run. Do you have any comments about >> >> These changes look good to me. Sure wish we had an easier to way to test >> commits in the build farm. > > That's why these tests are not that easy, they can be racy. I've run > the test 5~10 times in the CI this time to gain more confidence, and > saw zero failures with the stability fixes in place including Windows. > I've applied it now, as I can still monitor the buildfarm for a few > more days. Let's see what happens, but that should be better. At least sidewinder is happy now -- and the build farm in general as far as I can see. Thank you for your help on this! -David