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 1u1umG-00ABnV-6O for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 22:17:12 +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 1u1umD-004Juy-Lx for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 22:17:09 +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 1u1umD-004Jup-Be for pgsql-hackers@lists.postgresql.org; Mon, 07 Apr 2025 22:17:09 +0000 Received: from mail-yw1-x1136.google.com ([2607:f8b0:4864:20::1136]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u1umB-00407L-23 for pgsql-hackers@lists.postgresql.org; Mon, 07 Apr 2025 22:17:09 +0000 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-7040ac93c29so18945767b3.3 for ; Mon, 07 Apr 2025 15:17:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744064226; x=1744669026; 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=AL0D2vlw6MEn/Pd7BRxtaWdlLtx4qu9W7aOSKswi1Yk=; b=FvNcmqEHacjfCwhxll+iMBLAt2aL0t6kDBjfpen+GN23apIfqoySR21Q/btLjgyM5y JNEjT+lbSohyh3zNsO0jZ3V07EdkjHRexQA4Gd71FCl+yQeJ0UUO4Z/lmD2rXYf98WVB m5516o+pzl4t94cx/VqyVc/PXxaiWy+ZgyyA6MyhWKh3id93xuFvBKgGYHyg0/34OYjV IbfYgoNI6OayyKKr6kBV5gj304INE8+ds9xwHhqOJGyQ5ZX8M9lKU8qzT3wX6vyh6c60 6RPqMIvU8Q1Xy4hAHboAUgjgYBfBhKW7vd/RDCFOlw973IBZZ+DxAR0LrSQfJW8wdPlP EpFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744064226; x=1744669026; 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=AL0D2vlw6MEn/Pd7BRxtaWdlLtx4qu9W7aOSKswi1Yk=; b=Vx5Nj0S1+EA8NC0/Vguj1gzBscOsVE2pzVHvW9koaaCugNooeoSNFybYucr4/fbjEL jw55BTyqcX7MdrXyBdGdUgCCBm8OXszMtNl3vNNIReX25JK/f7Opm7tLHOKVQHo/bhXo JzAhabDCBnvzMz4H+KMMU0JGYZc4T9FrZvB4fzN2S/a+eU+EgqONCzIOV2AKaCSgCpA7 H3ipnGpNmzjnnxMYRzWLSuqyvK5DgDUcs58rkyQeu/Iv0FfpzK7qv+VnTQk4rQnvJ4DU 0EPR4KxIQxf9iJUL7mUQrNsHT9E1M7cU6h2FudOijhwIBpl/5ZgAfPOZd1lsohOqIVVC 05kg== X-Gm-Message-State: AOJu0Yx9SmnMbLhs3a0lu0CKJriOI9SxhyKFayjGABfm9UliVAUKzC5k rQOQ7nM66839W2FsjDGlYKMIkf2XLp2E3Oaw4MRUDW7bWTxXOGvug8XInw== X-Gm-Gg: ASbGncvdreEQT5F1cqvxxk+zkdmOEuhXLf06NpQHdhmGPsV86n/CL6wxzABJN85aFns W+gngWsGsmafFZu29MOEek4dTvSurtbxiLAhbnQYE6/2diVcymxFPbs85NCUFIE/X20I9fdWY+L dtRcE4ft0zEvXqGaHj8DVQi4GHFWdnEYI/HyKcIMEqxqLspP9MjZwpOwXf7SDJSzBLOEwyo70NE iiMOJea/3QJYWZJP9Fc5uSuc7M9SlFleXPXC3E98xUuZbYi/lzEaH1+ocuHkpcXrDkmc4G/Dr8e i9pUnlQNLy2f8O6Qx7DhfuHH9UuBcmrchtAQHXY6KYATkDahF1i0gukt2yGLTznc7h0+v0L81GA Ld0mgrQvOaVwC97hoc4rYSJ6+RKQczS6uPg+p3XHzwKYNZQ== X-Google-Smtp-Source: AGHT+IEXxOszC94tZcvRB5i9y44j2kj6Y7qDvuyUNUrCFSe/a3JsS7sXit65g2KWbZQba/bvDRc6bg== X-Received: by 2002:a05:690c:360d:b0:6fe:c021:f745 with SMTP id 00721157ae682-703e310b771mr227895547b3.4.1744064225899; Mon, 07 Apr 2025 15:17:05 -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-703d1f70669sm27429277b3.72.2025.04.07.15.17.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Apr 2025 15:17:05 -0700 (PDT) Date: Mon, 7 Apr 2025 17:17:03 -0500 From: Nathan Bossart To: Hannu Krosing Cc: PostgreSQL Hackers Subject: Re: Horribly slow pg_upgrade performance with many Large Objects Message-ID: References: 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 Mon, Apr 07, 2025 at 10:33:47PM +0200, Hannu Krosing wrote: > The obvious solution would be to handle the table > `pg_largeobject_metadata` the same way as we currently handle > `pg_largeobject `by not doing anything with it in `pg_dump > --binary-upgrade` and just handle the contents it like we do for user > tables in pg_upgrade itself. > > This should work fine for all source database versions starting from PgSQL v12. Unfortunately, the storage format for aclitem changed in v16, so this would need to be restricted to upgrades from v16 and newer. That being said, I regularly hear about slow upgrades with many LOs, so I think it'd be worthwhile to try to improve matters in v19. -- nathan