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 1u92YD-00EmWY-B1 for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Apr 2025 14: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 1u92YB-009GzX-L9 for pgsql-hackers@arkaria.postgresql.org; Sun, 27 Apr 2025 14:00:08 +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 1u92YB-009GzP-Ab for pgsql-hackers@lists.postgresql.org; Sun, 27 Apr 2025 14:00:08 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u92Y9-002Dt2-2n for pgsql-hackers@postgresql.org; Sun, 27 Apr 2025 14:00:07 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-30dd5a93b49so36129301fa.0 for ; Sun, 27 Apr 2025 07:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745762403; x=1746367203; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=dyG4DU5wRvw2X/ZiDh3kLSHh0Ah24QZ9NhaCVz5VnOs=; b=Pjt8kmZQynLkdhdweKR1DbXG+hCKqMLkAq2TqGnWWPfF9+f6DIyuVks/vDbJd8D02F dnorjUBECgSdgb+aXdS/oReTpD5YhX4pfH0YiC97o8m1a1Bs+sdKkfVw+5bCqbkMt7P0 ncBwo6/VBPYkFD60ZmMoOVSZuJIJHLo/ceoInDCBkYxWsMO9XIM12+KtJcE/6/QWrPtN uK1mC3MgrZ1V00qDo4btyZ9nLiabK1HiitXaYSsv5IqdqCzzEgVCpXa6hDvXod3aJQsf qN+Src2ntTowK+ZSc7ZNR6s5NJr56scWxRFGMp9fTsyyeit/BhzhvUyu2AwK8ckmveyS JH3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745762403; x=1746367203; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dyG4DU5wRvw2X/ZiDh3kLSHh0Ah24QZ9NhaCVz5VnOs=; b=X6tgGLgKQUcSt3stBB+8Lh5TdH2XLBP6r5GSSbOD9g3kx25dd9zXreZW6xa2yP/50A 0eTgnm6fIHddcw8qugd8vbhBHarAyibCVZr+/UXob6j03GZjIsqm1GBKu76npxJqKRA/ RnGbXdaJWrT5kGM1Mss1S+p8cqwM5xm3zXAW1jFZ+tjxtzialK96ciMfmDqSYniWmye9 aLogLVy9vziJrRp8XHzDDKluV1dKlqej9ivTsu5jkUZyfR6gyMKtD1pURg8trL3PnqVS jdJiGnXicuMTDNqStn4pDD/qzp6YTx+YkyrOwrOg91qGB/3rF/c9c0/cd3PU9MpTWkJD gEkQ== X-Forwarded-Encrypted: i=1; AJvYcCVeL0br0dyC+HI2lb0AHgpgoAXrLjs5GZnejXdgl/k4vIaZhWCokrIcBX2hdI5GmO7jQn0sK4pye1R/4Wf3@postgresql.org X-Gm-Message-State: AOJu0YwN693q62IRTKhdwq/2aI8vSQISKFnCk6/6ayY1C3kZgHhh3qY6 go8lkU4+Pjg9RCnYiguQejQcJhAOz+ipQ09oS+8vjJLtkwewQJ9v X-Gm-Gg: ASbGncuQQaiIDGs/PIFr35UKuA8DAvXvhVNK9kOIxWF1JTLSVdobGEtJmiHR2jWkIzF mgIBNbHlJ8D6Ao7ygZsCTuFfVQixBdbW2kmPkePPyGSHavzmeIw33l/ASjMPs0aaBXrXtMbZmLB lRGbXrefd7VsVfJAcCaPrDk2+844DlQd3MG4VS8Jcy/onDEMoGTAKJKE9ogFbTUzZZ9Zgh7eXX5 A8zsj9DJFGLS0I5S6liYHazMduQE5/SnZ4uC3hJ0E0yosKIzHBL9cfsSHLhJqVncVwqAm0R9cbY 0BIDrCVGJTacjb8JNZlQcUslQ3D8TX0vvZ1haogXGPw= X-Google-Smtp-Source: AGHT+IEgSK1yi1JBE2QFiiTT93eGr703bAiO0x7cN0nwnlWdaol0dor8KRoCq5g7UFfCm+ESv5mPew== X-Received: by 2002:a2e:ab09:0:b0:30c:16cd:8818 with SMTP id 38308e7fff4ca-319dc4155fdmr16653531fa.16.1745762402634; Sun, 27 Apr 2025 07:00:02 -0700 (PDT) Received: from [192.168.0.50] ([89.149.68.176]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-317d001965dsm17572421fa.55.2025.04.27.07.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Apr 2025 07:00:02 -0700 (PDT) Message-ID: <7161562f-d00d-41a6-bd8a-d15684d3eaf2@gmail.com> Date: Sun, 27 Apr 2025 17:00:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: optimize file transfer in pg_upgrade To: Nathan Bossart Cc: Tom Lane , Robert Haas , Andres Freund , Greg Sabino Mullane , pgsql-hackers@postgresql.org, bruce@momjian.us References: <7rhxl5nl5cuenm4kzprjhaojo74m2teuwzjffcrdi6bxx6b2wn@orb5h3mteh2y> <712605.1742401713@sss.pgh.pa.us> Content-Language: en-US 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 Hello Nathan, 20.03.2025 04:02, Nathan Bossart wrote: > On Wed, Mar 19, 2025 at 04:28:23PM -0500, Nathan Bossart wrote: > And here is yet another new version of the full patch set. I'm planning to > commit 0001 (the new pg_upgrade transfer mode test) tomorrow so that I can > deal with any buildfarm indigestion before committing swap mode. I did run > the test locally for upgrades from v9.6, v13, and v17, but who knows what > unique configurations I've failed to anticipate... I found a couple of the 006_transfer_modes failures during the past month: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=drongo&dt=2025-04-08%2004%3A18%3A15 https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=fairywren&dt=2025-04-21%2008%3A03%3A06 Both happened on Windows, but what's worse is that the failure logs contain no information on the exact reason. We can see: #   Failed test 'pg_upgrade with transfer mode --swap: stdout matches' #   at C:/tools/xmsys64/home/pgrunner/bf/root/HEAD/pgsql/src/bin/pg_upgrade/t/006_transfer_modes.pl line 61. ... # Restoring database schemas in the new cluster # *failure* # # Consult the last few lines of "C:/tools/xmsys64/home/pgrunner/bf/root/HEAD/pgsql.build/testrun/pg_upgrade/006_transfer_modes/data/t_006_transfer_modes_new_data/pgdata/pg_upgrade_output.d/20250421T081115.575/log/pg_upgrade_dump_1.log" for # the probable cause of the failure. # Failure, exiting # ' #     doesn't match '(?^:.* not supported on this platform|could not .* between old and new data directories: .*)' there is a reference to pg_upgrade_dump_x.log, but no such files saved. I tried to reproduce this failure locally, but failed. Still I discovered that when the test fails, the target directory containing pgdata/ gets removed, because of this coding:     my $result = command_ok_or_fails_like( ...     # If pg_upgrade was successful, check that all of our test objects reached     # the new version.     if ($result)     { ...     }     $old->clean_node();     $new->clean_node(); Moreover, even when pg_upgrade succeeds, IPC::Run::run inside command_ok_or_fails_like() returns false, as we can see from a successful test run: https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=fairywren&dt=2025-04-27%2001%3A03%3A06&stg=misc-check pgsql.build/testrun/pg_upgrade/006_transfer_modes/log/regress_log_006_transfer_modes [01:18:38.210](21.036s) ok 1 - pg_upgrade with transfer mode --clone: stdout matches [01:18:38.211](0.001s) ok 2 - pg_upgrade with transfer mode --clone: stderr matches The corresponding code is:     print("# Running: " . join(" ", @{$cmd}) . "\n");     my $result = IPC::Run::run $cmd, '>' => \$stdout, '2>' => \$stderr;     if (!$result)     {         like($stdout, $expected_stdout, "$test_name: stdout matches");         like($stderr, $expected_stderr, "$test_name: stderr matches");     } So maybe it's worth to adjust the test somehow to have interesting logs left after a failure? Best regards, Alexander Lakhin Neon (https://neon.tech)