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 1uZYzS-005EAY-FQ for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Jul 2025 17:53:54 +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 1uZYzQ-002Kkf-GX for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Jul 2025 17:53:53 +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 1uZYzQ-002KkX-75 for pgsql-hackers@lists.postgresql.org; Wed, 09 Jul 2025 17:53:52 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uZYzP-006RNX-0l for pgsql-hackers@lists.postgresql.org; Wed, 09 Jul 2025 17:53:51 +0000 Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-3df30d542caso427925ab.1 for ; Wed, 09 Jul 2025 10:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752083630; x=1752688430; 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=zhViOw7n36YgMWf3dtvRllB1KszYafanlDdrUb22hSs=; b=gFonmOZy5hbL74VIAIt06FFMtuYOSjJg1UF8Cv8BK88iJxi8/vWcLqvullqP9OtGbj KTWRw8JQCydZQcYuIhn7MvcMtR37fh/Ei3MX6HASqfy9q6CPAPADMnQb/BY3fRc5V35O FyyLcou5yWiArB8AIzgsEzGKR9GWWsmEh6sUR4+LUg7Hnlv2sSt//ABIoUYKN0/GpjcK Nlgp08t6h1Q6wSP/3jn8J1XyMuHKZO7vTxRoZMBlsgWWQkL9S92VRHYPEaGUz2ZERbDR 8W6A6nopj4Fc05/kLLtP7oIvR4q9h5RLJII6nxi4eoSZe8X80Gac8eOP37fK19HeCq/g Eqxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752083630; x=1752688430; 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=zhViOw7n36YgMWf3dtvRllB1KszYafanlDdrUb22hSs=; b=c0eEPO1koXvMdGyV4kTTBWRo5lPfZg/jJ8OFx4BPkRubpNwIu7FifRbry97rI0o8fx +7SORdgIgFxolA1gHoE3GzolyGIlR5m0B5wvo+FQB+BF3wFDbVa/5l119CJEQaYmlpaL kTyMRa0Z/uDwzxtR2AB1Gs8pKNf9aTn7+g+Xtv7itzTaXq09DnB4C9dgTFzQcVT0zNNF YDpD0waQ6yH2b5EyE0f+jFi0HzKA//kUaKoB9nIIxKxKgRrVbsPBbK4wQOPlDH/w+TlO dHXrtPGc1AV9sTyiiEpg/jU6LcajN1xLK+pmwQZY6iN0KumMrV5HKvsTVzLQ1MV5L3Uh a4Wg== X-Forwarded-Encrypted: i=1; AJvYcCVH7OPys/Td9GzzXY+GiNVHE+7MZiT2bOQaF8ANSjus4w2AuqKGWlaERsJreBqEyy/Mpv9nW+vFObsV5oC/@lists.postgresql.org X-Gm-Message-State: AOJu0Ywxnvi8Z/+RzuNzqnopquVEFOa+PCL+ESkA0MIeSqzC6jbSIRM2 +qtUPIR2N0OJDBSY5nXFanWQJtLbIO1Dg+hko+9lna9wKZvwBI83dLNd X-Gm-Gg: ASbGncutMICnu1oCGCxavquCfAJaSHiMbYkFNkxXAXT3PdKd9FYryARB3V/8ffFv99D rEZcl9bmzZ3L9gQvw4t7lZKDVbiJ5RDbZ+fMUsjDJtfTE7MSJIJrqhoLQZ1afAw+AuWGhI4rSQ6 7vwIi1zYzE15oDJrjAYMBLoVHg9ksBmL9sweqgHnMHovZ3h74aDCpcDnRh3KXBe+HoWqILo9jwa D4cmS7jyJlBWfVtO760NYWa8L5ak9jqdYI/Kbt6v9r1DMz7mJHq0+hvi9vUpl2vOT17/LMu6YH8 UCmEsqB5aCgP83Fqs5yShsfyODgVqzozM3TzxKT/znCQuBzl+53J00w72nBM19kDCJb7gufy643 tRTg6lVgF8OBuee7cjvaOZUtLtDmzOHW09IcdVdIOpcDtJ14WM8pEP5uyfA== X-Google-Smtp-Source: AGHT+IGE+6e6U2e8TJLqTSy7Ef1KwhMmhctikAdiE0vKcBAR/ng8z8d9+fNmN+vkuI8qEszhRVze/A== X-Received: by 2002:a05:6e02:3d86:b0:3df:3886:ad6e with SMTP id e9e14a558f8ab-3e1670b3fedmr45743715ab.12.1752083630272; Wed, 09 Jul 2025 10:53:50 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-503b5be9bb1sm2819058173.89.2025.07.09.10.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jul 2025 10:53:49 -0700 (PDT) Date: Wed, 9 Jul 2025 12:53:48 -0500 From: Nathan Bossart To: Hannu Krosing Cc: Tom Lane , PostgreSQL Hackers Subject: Re: Horribly slow pg_upgrade performance with many Large Objects Message-ID: References: <4044567.1744128814@sss.pgh.pa.us> <4047312.1744130263@sss.pgh.pa.us> <4050387.1744132029@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, Jul 09, 2025 at 04:52:16PM +0200, Hannu Krosing wrote: > If you run it without the last WHERE it is reasonably fast. And it > behaves the same as just inserting from the dump which also does not > have any checks against duplicates. With that change, the query is much faster, but my testing indicates that it's still measurably slower than dumping and restoring the relevant contents of pg_shdepend. -- nathan