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.96) (envelope-from ) id 1vo54d-00FHGo-0y for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Feb 2026 19:31:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vo54c-000eNI-0S for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Feb 2026 19:31:29 +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.96) (envelope-from ) id 1vo54b-000eN2-2h for pgsql-hackers@lists.postgresql.org; Thu, 05 Feb 2026 19:31:29 +0000 Received: from mail-oo1-xc30.google.com ([2607:f8b0:4864:20::c30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vo54Z-00000001EkE-0sLw for pgsql-hackers@lists.postgresql.org; Thu, 05 Feb 2026 19:31:29 +0000 Received: by mail-oo1-xc30.google.com with SMTP id 006d021491bc7-662f5c5507cso979824eaf.3 for ; Thu, 05 Feb 2026 11:31:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770319885; x=1770924685; darn=lists.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=Gcp7PWa1HYlo5AjWPRlNkYGqf4XyPUfvVfKM/sUYcNk=; b=SXm4q4IfNF6wLyAFra8fYRoJjLvfoeWfVMrNXEhGgmMlY4WfGERekRXyhb1wQXjGhY vQVVVIxPcFoqJJ+jepG5qJiiFwEOiAstzYMuIN2Suz5frIU7seVds+iFGBlQHAz4O/t7 6BWLPFy6iCmcvngzhjuj4MfKMrMM95CuysguV2c0Plw5jnY7lIk5S0s84CMDIQ9F8+7O zZdAf9EDMcb2n3bkeZP2IkaQg/t58Wiq/+99kdRfSbe+cKwegcLgnv/q35UTg6mSdwgq NreE5fQshNVqerJwNuuqqOR0jAoJaD/8uOV5ZI8wr6FIWtRDFVe2lpw5l2Zzk1ns+pWk 1XsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770319885; x=1770924685; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gcp7PWa1HYlo5AjWPRlNkYGqf4XyPUfvVfKM/sUYcNk=; b=cBL3bzMxBwSGO49jjIz65hCfvyw7A3egl/K/tWvuV9QXvCL/H/sVpnFm0e3XnRAf4B 042dQvOEfZFvMK914YZWpxbG0hCcetoy1AGPiITODwyAEmOYRtAqqyey/KluOq7bXyKi m22553xzVpC0o9lepsipBiXsQUFFfIjForMEp4tq7mSi0kfi/fYSvlygyUJf38L7xGX4 rx6I+f5yayd7f1wejyOm1c+8K79bnt67rmNIETrQJ5TtrVYHvaIWs4qSumvdKpxezWRu 8ovQHhcwdEhRGm9haKXvRwYY9zqjGEFajjO9A46igYNz7b9tiwP4PafgtL/wALo75X77 B8lA== X-Forwarded-Encrypted: i=1; AJvYcCUNxagI9MD2a0UYB5+hXq15UVBUuy1glMgGWtXOOiWsN1rEFIvc1g4d0P3Kq3CEqxlPdU12tsJHfj9xrlpR@lists.postgresql.org X-Gm-Message-State: AOJu0Yz61twgznHLABhD9DrJyVcmXhBGnozMQQnoqMNfsHHFmXgnS2HN Twq1dPduwGFNkgQMDmAeVNRCZVYyRpxh2DfFOBx1GtZO+PBWJ+ETb4lx X-Gm-Gg: AZuq6aJteHCPDWxVzJnyZccxtO3C7YJWo3MAY+ipAQaiqyXn+FQMMRj8afGgbUCAu6h Je1gZMCn0lEYUOfA3QYTOSA0mbBFzWNt9gRXb0erfkYu7zKJwcxz4R3Q2dT7ns2oLfQ9p9fH8ZW mZ+1IvrE8lSdLe7jpTwkVp3opL3Fc6Wk1lie72Yhenpprg1bScPv1TR5IIawFBQJHCmo58ZDBFd ES/NX1IDO/zAYBaQnWkBjuAoawByMV0CWDyX20C/gb+POnmXAObfn6k0th1unA2sCt9D1OmcjUc NBoKQZfYNAll4Ex/W4d/GJAIrbje0wpK+kmlblV5DuGUWZmrzAXuHtgitOE5HKoL/h6MCvNA8Ql w+RJ0CflBQMQJI2U9J3AQ+MWIuhdg0LFaPCcsEkIal1Lu0SKnhvZNeV76j//SWGDUVGns6kzvDH 3OMbHWMCch0B9L8PRGY4hgikNkKJzvaEqRh4H/Ky4cgpEU4mXlUWCJg6pE2SOLKneDBS3z7VKDa 5Tp X-Received: by 2002:a05:6820:1803:b0:65d:1697:e6cc with SMTP id 006d021491bc7-66d0c472cb4mr195174eaf.60.1770319885312; Thu, 05 Feb 2026 11:31:25 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-66d31e5d4e9sm11474eaf.14.2026.02.05.11.31.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Feb 2026 11:31:24 -0800 (PST) Date: Thu, 5 Feb 2026 13:31:23 -0600 From: Nathan Bossart To: Andres Freund Cc: Michael Paquier , Tom Lane , Nitin Motiani , Hannu Krosing , PostgreSQL Hackers Subject: Re: pg_upgrade: transfer pg_largeobject_metadata's files when possible Message-ID: References: <3yd2ss6n7xywo6pmhd7jjh3bqwgvx35bflzgv3ag4cnzfkik7m@hiyadppqxx6w> 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, Feb 05, 2026 at 01:02:17PM -0500, Andres Freund wrote: > Upthread I also wondering why we do all the work in getLOs() if we don't > actually need most of it (only if there are comments or labels). Right now > that's a very slow and very memory intensive part of doing an upgrade of a > system with a lot of binary upgrades. Do we need *any* of that if we go the > path you suggest? AFAICT we only need it for the comments and security labels later on. Commit a45c78e3 did batch 1000 large objects into each ArchiveEntry, but of course there can still be a ton of entries. In theory, we could update the pg_largeobject_metadata query to only retrieve LOs with comments and security labels. I'm not sure it's worth trying to optimize further than that; we've long operated under the assumption that comments/seclabels on LOs are pretty rare. -- nathan