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 1tuz95-00F8oE-Lh for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Mar 2025 19:32:07 +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 1tuz94-00AYFt-3R for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Mar 2025 19:32:06 +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 1tuz93-00AYFk-Ph for pgsql-hackers@lists.postgresql.org; Wed, 19 Mar 2025 19:32:05 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tuz91-003r2N-30 for pgsql-hackers@postgresql.org; Wed, 19 Mar 2025 19:32:04 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-6fedf6aaed2so401417b3.0 for ; Wed, 19 Mar 2025 12:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742412723; x=1743017523; 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=4BYDULHSXCntdprs3tRLUy31CCzZDVyDqQ7ZrEtMmKQ=; b=UYf+axXBF9erG8zlnFULFm7QYl6WuLVAqZUsSP6rD+M4wx3drz6+yJM461LWAb15aR QKelp0cDXwnttm9gGRaUZvaSAQfNVB7gEjiC7vFmNbtd9NLr3Oe4EiNE3+C0loEovHJU YYmE6pczaUzEPWDbtPHX7UpPTPDwWS57264ZD3inOlnTGFLkI1/nGKympsGB6pMW3wkO AJ/xel51skp4GOtsopeFPTz84sJX/uA5Lg6veawzYFWOg2Yq3v8mZQwZRMeiSWoMZa7d 5SIfokaGrc1naSj3L0kA4FXKi93KYHg6oGvz4x46+hJwaMbbLsoMF25v3oxEcZteJau8 sa8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742412723; x=1743017523; 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=4BYDULHSXCntdprs3tRLUy31CCzZDVyDqQ7ZrEtMmKQ=; b=sXWGvSLG0pWYJOL0P31oC4YuJAgRRhxz/6XkSr9Di+2u7WI5M9doDNNB80h7vKeyny krtoc1WF6wQjaQ8hXZMMtx4oBzMeFy3T9xYmgJ1n94IfR/s8sJkqdPe90V3eumTq8lCb hkYwDg5fuR5F4lo5QQ/optR0yUZXVV+OkqLcykGTxJuIU5U9JIvfykd3eqAqnGxO3IP1 HPIQiy2t9ychePMNViqulaXcolJCydZAKbDakl+U6/k9wXVKmY/t48CCeM3+g9E1Bhol MpCHBN72uqyyVI0pOZ2uOKacwE3aCo7dg8rtQp1VbDCWK/x4gB4LD39ic6tz0ErmoyT2 X12w== X-Forwarded-Encrypted: i=1; AJvYcCWtoNx05+AdCHabCfb2o4bE14AIhE4LriL2uYDPDZWj7BWD5LXIMivplrmxx7ZEpMFxFkq7RAhJY/VcUnZN@postgresql.org X-Gm-Message-State: AOJu0YynvzyM0gQN+MMUpuFWrAAQAGkoNN4WSblI1HEdRMZwOXYZIh7n iP+EguMDg9AFDpH+FiZ2ggReH0B44Dhd9TBkyHAB3U3PcoyN8SBN X-Gm-Gg: ASbGncuGeYp94tom853MHtanmIAgtfdcXPC7gjyztOZaDpWGdqWcuwvK1yDSO5otEk2 txn8CknzCImRw5nOe71HaPH/wY+S4EU+m8ioCz1WCOWm3LknxQKVTfof9wusNe2ovnDSVBI10t4 56g/8pVaUL4N1eg1W9uS5nNSoBQSltaUUyMD/K8h3mY0IH20paXiJRbS/bKpYVoNfy9CXN1rGmn HKct/rWJCO5w2/+Yzp52lGZoKVetDECpNwJJ5nz+7cbbaEbYVHL8pqP3QqLrkntbzri2r82K4cb rje0uMqITPLdcWW73IFiniGGxuJ477PuKwp12mnEqacV/97gurs+9iic0cAduwRQSrQBt9m4wCJ XwejZlbU5I5O0DYr42czdefpOmZoOwbGULuIkK0C2Hpn71A== X-Google-Smtp-Source: AGHT+IFqqvJjSThHMgxEyhzAVBE+9Z7CbwiVbHcLR2nevPupXehhCT2oaAdfjUC6lvE360Ro4cpeng== X-Received: by 2002:a05:690c:3805:b0:6fe:cd9c:4f8d with SMTP id 00721157ae682-700ab22c8e3mr12902757b3.1.1742412723289; Wed, 19 Mar 2025 12:32:03 -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-6ff32cbaabcsm31683417b3.115.2025.03.19.12.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Mar 2025 12:32:02 -0700 (PDT) Date: Wed, 19 Mar 2025 14:32:01 -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: <7rhxl5nl5cuenm4kzprjhaojo74m2teuwzjffcrdi6bxx6b2wn@orb5h3mteh2y> <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 Wed, Mar 19, 2025 at 12:44:38PM -0400, Andres Freund wrote: > On 2025-03-19 12:28:33 -0400, Tom Lane wrote: >> Nathan Bossart writes: >> > I'm currently planning to commit this sometime early-ish next week. One >> > notable loose end is the lack of a pg_upgrade test with a non-default >> > tablespace, but that is an existing problem that IMHO is best handled >> > separately (since we can only test it in cross-version upgrades). >> >> Agreed that that shouldn't block this, but we need some kind of >> plan for testing it better. > > Yea, this is really suboptimal. > > Shouldn't allow_in_place_tablespaces be sufficient to deal with that scenario? > Or at least it should make it reasonably easy to cope if it doesn't already > suffice? Unfortunately, pg_upgrade can't yet handle in-place tablespaces. One reason is that pg_tablespace_location() returns a relative path for those (e.g., "pg_tblspc/123456"). We'd also need to adjust init_tablespaces() to not fail if all the tablespaces are in-place. There may be other reasons, too. I'm confident we could get it working, but I'm not too excited about trying to sneak this into v18. In addition to testing with in-place tablespaces, we might also want to teach the transfer modes test to do cross-version testing when possible. In that case, we can test normal (non-in-place) tablespaces. However, that would be limited to the buildfarm. Does this seem like a reasonable plan for v19? -- nathan