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 1to6YF-0067WA-MB for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2025 20:01:40 +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 1to6YG-00Ecf5-Nq for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2025 20:01:39 +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 1to6YG-00Eceo-EG for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2025 20:01:39 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1to6YB-000ER7-2B for pgsql-hackers@postgresql.org; Fri, 28 Feb 2025 20:01:38 +0000 Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-855a1f50a66so75592139f.3 for ; Fri, 28 Feb 2025 12:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740772895; x=1741377695; darn=postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=VeO4CL615ahZLTpqTA8RFsjIr5E/1lqHMhG2fcA2XWk=; b=gxaWaExbcQdE+QCuZgUQa+aDrVcAolDllOTKlFKFVyxb9SLLW79fn54wlxrk9yP1S0 C52VDntIQKmpXKfuf53KO0OWm1zdeTJcJ3gUilJxsuoQW7ith7KrpDPyuqtV2Rdw2Vvl VoS2M1fSmR+02phrEwOjdLjAC7Vh1CdwWhrn7BttQiyk2PG3r7hDLEHgn4Zbuvbz+PGA GmD+UVzzvAK7pxl0G7D/WJtsHLQbfpcWFU2kjSJKKa+jqLVT3CGX6rw8sRJTA3zxDgH4 HX40P9JMeMQVBU1IZLTRcGU0QMiN7wxdRHZtwxgbOp+2bjRqpzXExai40nSLHXmrhznp gayg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740772895; x=1741377695; h=in-reply-to:content-transfer-encoding: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=VeO4CL615ahZLTpqTA8RFsjIr5E/1lqHMhG2fcA2XWk=; b=isndvlDo4SK9ZhGVbTWN9yRok6g2e/70iMd+NIFDYT5WD0Sr1eLgx0EFy25MTFaYvl HTwa3pEjm/qgexJ0mAbvFupSucaXkkSt1K8Ru6mazQedx00tZO7B9ithiSuTbbf41TH7 2oCvgn0TCmnw6eNBuExJhoEQsDA8/vrd40/ZKTlXJkuWwyOf1xpLzHvC//Ly16p/+KsY mOvaQLky4weQuMXYJdTsMmwt2XWePL2N7TM+qUgrf1WotX2ZmdN/A8fFCYrEC5nz7cZi IE5VFbkOPO9/h8r6BZVmvzr12zERVS2op4ogLzLDN5C6Pb9hxRGEaKngxGF0UnMJMScN n6hg== X-Gm-Message-State: AOJu0YzfpQ/JFULqjfv0xrg/fSIq793PAzwW3K4/QqlmSdywMiJzBGIZ DMxyXXe89JuKgt68vc0UQ5OPjl0g1OVotK4iYjb2GheTY9tm9sfw X-Gm-Gg: ASbGnctViBJdWedQEkqHSXqyVgpKuk45t0ed+uuC7j5eI0ZTE6KtPqapA2LGM75jL4H MhJ/MUWvJnKnKnPuOCU4XEcX7j2u8FDxncBScBs5DCHdFIMB+HeMkjBe05temuRdg4tECfy+L3K gQ3OvzFyQuntUVZTeLnjegxeMc8CId/TV6wvd7BX6FZgjQZTcXXiNm86BzgZQ4bKhJ/GBLg4738 VDm3H8e/aGPq0H2U2pYPCY9ZB2j0UXTEtxozk6F6l9k4usnt0XvaEVLE14nZYkBcdu4hinoYKSb 0rAe0frz9ArkpLzlCHFcYwubIjvJlhzMkMf8nQiBF393m2gjpW9ewIpUERS3GujNmpxAdMeydFE q2NfDAx+2G5lBGy03 X-Google-Smtp-Source: AGHT+IEHlDZuwNILMMInHKZP8HHQncPma3qwN6WNiZXP+M2poVH3pESIT9PBa4YitBkUMozZefxl0g== X-Received: by 2002:a05:6602:601b:b0:855:1a4b:8f43 with SMTP id ca18e2360f4ac-85881f26cdcmr499814239f.8.1740772895130; Fri, 28 Feb 2025 12:01:35 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4f061c720ccsm1054619173.74.2025.02.28.12.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2025 12:01:34 -0800 (PST) Date: Fri, 28 Feb 2025 14:01:32 -0600 From: Nathan Bossart To: Robert Haas Cc: pgsql-hackers@postgresql.org Subject: Re: optimize file transfer in pg_upgrade Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Feb 28, 2025 at 02:41:22PM -0500, Robert Haas wrote: > On Fri, Feb 28, 2025 at 2:40 PM Robert Haas wrote: >> Maybe we should rethink the decision not to transfer relfilenodes for >> sequences. Or have more than one way to do it. pg_upgrade >> --binary-upgrade --binary-upgrade-even-for-sequences, or whatever. > > Sorry, I meant: pg_dump --binary-upgrade --binary-upgrade-even-for-sequences > > i.e. pg_upgrade could decide which way to ask pg_dump to do it, > depending on versions and flags. That's exactly where I landed (see v3-0002). I haven't measured whether transferring relfilenodes or dumping the sequence data is faster for the existing modes, but for now I've left those alone, i.e., they still dump sequence data. The new "swap" mode just uses the old cluster's sequence files, and I've disallowed using swap mode for upgrades from