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 1s4mC2-000ush-UL for pgsql-hackers@arkaria.postgresql.org; Wed, 08 May 2024 18:39:06 +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 1s4mC0-002KHi-3a for pgsql-hackers@arkaria.postgresql.org; Wed, 08 May 2024 18:39:04 +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 1s4mBz-002KHa-QM for pgsql-hackers@lists.postgresql.org; Wed, 08 May 2024 18:39:04 +0000 Received: from mail-il1-x131.google.com ([2607:f8b0:4864:20::131]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s4mBr-0003ux-Q1 for pgsql-hackers@postgresql.org; Wed, 08 May 2024 18:39:03 +0000 Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-36c7004daecso4080785ab.0 for ; Wed, 08 May 2024 11:38:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715193534; x=1715798334; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hP9OkTvdyin0YPNut/PKU9+uFBexect+qoFJw0eaipY=; b=lMGXGi77ZREMeQ5CS//dR+VB5kSXuygPPsO7+PGlG8ioebJ3ZA7lKxKFGudtthq3gh eoVwiRf3/+eib3xPq/bQ5Q/adw8AXdUMFo4hYzpzDRaEnbQPWcYftXHoFRfhdwj+5cH9 Znco0+ISvyiSzDWdXHjf79xDAk6X/67gH9iw+e/izQpuK/qHmNID3OCmU0i4P6RKHzTF oddt8N20OX1eGOstxQ/Sikwq7CnsG0hH/f1wVHB0lXNSfaeMAoJyA0WdnUg8tg+0vx9Z IhqfXmGFcBykRh4d1m0iQ5L/HSAo47vofYCbr3R1b5+EyI5cxwwmk5o5g1S7je4VaWwq utNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715193534; x=1715798334; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hP9OkTvdyin0YPNut/PKU9+uFBexect+qoFJw0eaipY=; b=K3amX/W2V7b3AKB1dpsuOS40fmwJk0NoofARUUD5kuoeESzbBEBfSkLD6K7RydgQ4Z ba8VPfv6b+0A2bibAoRzWzhiRsNdWsb14bWxu6Kl1lu2m8yPnwW7HwS1t6ulx0Hpktzv tRCApuGf5TFkaNsduJT0//mTtY859cxLv6bEQ7/0XmJDXgVH7i+L7ttMlNcIGCd5d/8t S9AFU2rG+kZEbT/sVGrNu8pwtkDFINeuXM2Z2E3uob99xDPirmUOXS+Y/ky9UJuxDsYh 5Gl3S2Q2M/mgb0G1mHl9W/tsxqBo+fL1poZDwg/vQrxj5Rcb0p9x2z/ZtWinJ8tbrDhg du0A== X-Gm-Message-State: AOJu0YyjrFoJE+pUe8hdvOTcta8kyW+gEE+huCI9RvLuSpHhfo5WN5As yETbmdkf4EtLULiAi1W9QvCAFsoeKDSIAu+kOJbyytG9Qf9On9T8V9Wf4A== X-Google-Smtp-Source: AGHT+IFeMUfAC0SLx4SMWfElDQAcDdZjYi/21ElFKEN0WyYDiOgApOibbx3wMbwogY//zNV+BcjMvQ== X-Received: by 2002:a05:6e02:1c25:b0:36b:f0c:cd5a with SMTP id e9e14a558f8ab-36cb77377fdmr4519515ab.10.1715193534051; Wed, 08 May 2024 11:38:54 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id dm2-20020a0566384c0200b00488101433ddsm3683034jab.111.2024.05.08.11.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 11:38:53 -0700 (PDT) Date: Wed, 8 May 2024 13:38:50 -0500 From: Nathan Bossart To: Peter Eisentraut Cc: pgsql-hackers@postgresql.org Subject: Re: add --no-sync to pg_upgrade's calls to pg_dump and pg_dumpall Message-ID: <20240508183850.GA2824188@nathanxps13> References: <20240503171348.GA1731524@nathanxps13> <677ed9ca-8653-4c27-80ca-0ea763f0f21f@eisentraut.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline In-Reply-To: <677ed9ca-8653-4c27-80ca-0ea763f0f21f@eisentraut.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, May 08, 2024 at 10:09:46AM +0200, Peter Eisentraut wrote: > On 03.05.24 19:13, Nathan Bossart wrote: >> This is likely small potatoes compared to some of the other >> pg_upgrade-related improvements I've proposed [0] [1] or plan to propose, >> but this is easy enough, and I already wrote the patch, so here it is. >> AFAICT there's no reason to bother syncing these dump files to disk. If >> someone pulls the plug during pg_upgrade, it's not like you can resume >> pg_upgrade from where it left off. Also, I think we skipped syncing before >> v10, anyway, as the --no-sync flag was only added in commit 96a7128, which >> added the code to sync dump files, too. > > Looks good to me. Thanks for looking. I noticed that the version check is unnecessary since we always use the new binary's pg_dump[all], so I removed that in v2. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com --TB36FDmn/VVEgNH/ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v2-0001-add-no-sync-to-pg_upgrade-s-calls-to-pg_dump-all.patch" From 265a999ed65bf56491f76ae013f705ab64491486 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Fri, 3 May 2024 10:35:21 -0500 Subject: [PATCH v2 1/1] add --no-sync to pg_upgrade's calls to pg_dump[all] --- src/bin/pg_upgrade/dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/pg_upgrade/dump.c b/src/bin/pg_upgrade/dump.c index 29fb45b928..8345f55be8 100644 --- a/src/bin/pg_upgrade/dump.c +++ b/src/bin/pg_upgrade/dump.c @@ -22,7 +22,7 @@ generate_old_dump(void) /* run new pg_dumpall binary for globals */ exec_prog(UTILITY_LOG_FILE, NULL, true, true, "\"%s/pg_dumpall\" %s --globals-only --quote-all-identifiers " - "--binary-upgrade %s -f \"%s/%s\"", + "--binary-upgrade %s --no-sync -f \"%s/%s\"", new_cluster.bindir, cluster_conn_opts(&old_cluster), log_opts.verbose ? "--verbose" : "", log_opts.dumpdir, @@ -53,7 +53,7 @@ generate_old_dump(void) parallel_exec_prog(log_file_name, NULL, "\"%s/pg_dump\" %s --schema-only --quote-all-identifiers " - "--binary-upgrade --format=custom %s --file=\"%s/%s\" %s", + "--binary-upgrade --format=custom %s --no-sync --file=\"%s/%s\" %s", new_cluster.bindir, cluster_conn_opts(&old_cluster), log_opts.verbose ? "--verbose" : "", log_opts.dumpdir, -- 2.25.1 --TB36FDmn/VVEgNH/--