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 1txBRO-004ImV-Oj for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Mar 2025 21:04: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 1txBRN-009yyK-6i for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Mar 2025 21:04:05 +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 1txBRM-009yy9-TP for pgsql-hackers@lists.postgresql.org; Tue, 25 Mar 2025 21:04:04 +0000 Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1txBRK-0019Pm-1L for pgsql-hackers@postgresql.org; Tue, 25 Mar 2025 21:04:04 +0000 Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-6fead317874so49075887b3.0 for ; Tue, 25 Mar 2025 14:04:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742936640; x=1743541440; 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=pxWBmCB8dYLqssKtrVBs5FwPSAFrfxmgQ0ECVhCnSHw=; b=j5UbDkqEkcizVp6wWC6sIKhRDnBe3n7S7UBP0Sqf57mzwH3q9Gp8iYvgVc1raoRLrn kTAamVHrbe6Vn4bcHcpt3c0zKEdK7d1hlzREAGQvrKpYhq7potkpdxct/BsFqy4kaLHW DAbzoELgIx5Fx0bSrOZ069pywGgjwoAmjEC3ddoBN8FpkKu6gv7RbMSiNKpk7BUlB7LA UO7oUiWZMU2ffUtCIS4aKJwOFW53pahj1ReaCIB87xw0xbKo7Lp65OvCKNqddx3xNDAw SjMijsT+iXYxe/Pgxe3FsGLENlf++JvnlhEn9J+e8GkdOcPgYerUDEPXl0bHWRWhIoDd QcFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742936640; x=1743541440; 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=pxWBmCB8dYLqssKtrVBs5FwPSAFrfxmgQ0ECVhCnSHw=; b=uhWXOSaaK+2pvKrSPco1F0fOYnttiJxFjtnPeChNLRjekDtB58SOO82mupVtTEhFe2 0AFPBV/6hsLF6T8YZ+JJxkRRc1uN/INT2JV2kQ0OPwXCH6qs9n7YPPaBOCZz5AHsc50s eYpm4Ep3WxTVc1pw8ooLiv9EXkRpa0F3xO4OP8EhDjqBoPcKOecCkUVFg7MzlPXkq1Yl rs7DljVwAalqsaZEqsWplzwioTogRYePLJcMDJmR3UxmbCt7pj3tK9TUEnjMlxkfc0Gb /pZc2egt1y/sRfgiy65fw42FnnbBAWRgv/74h2Wywo0PxrfZq6vcwLV6q7RYN/gAtL6l lDtw== X-Forwarded-Encrypted: i=1; AJvYcCU4mfhcYe2khLrqEMU8DJTHqPZNK5R57nQmJHOiWgFyfoYY7uuWS6BLRKePzMFvnenKi3tcvjwGPuNxf5f/@postgresql.org X-Gm-Message-State: AOJu0YyyP3ZzjD9ILT6qgUwKSvuodKIhOuGah6/JCVNZX6yhTqkxAAcG 4AelY90RxDAFuu/9FR8YyHNo723APQPnCQzFGf2QHoo6CcSfkE/S X-Gm-Gg: ASbGncvk9INlkmJt0b2sqLonjvtb/EkLi5taLOH07pZgXrS++2x/SBj3HHIZ/Llldk4 07UH6Jyxb1hHBEirgKyv2eqbZeUK3zTdIbJwcJHwMFPf16E18shf35UjeQToRCrMAITpWnQt9n3 rWtLIEUjcGlQg2GTmBtfzoJaWEPc7MKCa/MJVTXxp3PLP/3exWpvD8nP3ptDnolQGS4m0zD/DAF yTMOGIo82RSyLfg17Q6jv/ephDL8m8LFtldAnEQmpeJAwxsP7nC4BtkptF41fGDEcLii0iBYdbp uinJ5UxB6XiJLYIss7Rxpj8Co7Q0sra0FcM0Vul4AWZIyQ9ZFuIOjJ3RJb4ZeI8MSBEPCt1zaTN Fu8IUAaIOdIn8cGO+IYeKkNCpzwIOtibLHg8= X-Google-Smtp-Source: AGHT+IHegE5lk0LI4Um45I+fDMNRH3l9kyfqTcnqzogpyXoto7pzA8xTJggI9PamA68qAu5raHqZhg== X-Received: by 2002:a05:690c:3708:b0:6f9:afa2:acbd with SMTP id 00721157ae682-700bad18b66mr254997017b3.38.1742936640173; Tue, 25 Mar 2025 14:04:00 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 00721157ae682-700ba85ba8asm22121657b3.81.2025.03.25.14.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Mar 2025 14:03:59 -0700 (PDT) Date: Tue, 25 Mar 2025 16:03:57 -0500 From: Nathan Bossart To: Andres Freund Cc: Tom Lane , Robert Haas , Greg Sabino Mullane , pgsql-hackers@postgresql.org, bruce@momjian.us Subject: Re: optimize file transfer in pg_upgrade Message-ID: References: <712605.1742401713@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 20, 2025 at 03:23:13PM -0500, Nathan Bossart wrote: > I'm still aiming to commit this sometime early next week. Committed. Thanks to everyone who chimed in on this thread. While writing the attributions, I noticed that nobody seems to have commented specifically on 0001. The closest thing to a review I see is Greg's note upthread [0]. This patch is a little bigger than what I'd ordinarily feel comfortable with committing unilaterally, but it's been posted in its current form since February 28th, this thread has gotten a decent amount of traffic since then, and it's not a huge change ("9 files changed, 96 insertions(+), 37 deletions(-)"). I'm happy to address any post-commit feedback that folks have. As noted earlier [1], I'm not wild about how it's implemented, but this is the nicest approach I've thought of thus far. I also wanted to draw attention to this note in 0003: /* * XXX: The below line is a hack to deal with the fact that we * presently don't have an easy way to find the corresponding new * tablespace's path. This will need to be fixed if/when we add * pg_upgrade support for in-place tablespaces. */ new_tablespace = old_tablespace; I intend to address this in v19, primarily to enable same-version pg_upgrade testing with non-default tablespaces. My current thinking is that we should have pg_upgrade also gather the new cluster tablespace information and map them to the corresponding tablespaces on the old cluster. This might require some refactoring in pg_upgrade. In any case, I didn't feel this should block the feature for v18. [0] https://postgr.es/m/CAKAnmm%2Bi3Q1pZ05N_b8%3DS3B%3DrztQDn--HoW8BRKVtCg53r8NiQ%40mail.gmail.com [1] https://postgr.es/m/Z9h5Spp76EBygyEL%40nathan -- nathan