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 1rZxXv-007NpS-06 for pgsql-admin@arkaria.postgresql.org; Tue, 13 Feb 2024 18:30:19 +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 1rZxXt-001eYx-9b for pgsql-admin@arkaria.postgresql.org; Tue, 13 Feb 2024 18:30:17 +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 1rZxXs-001eYp-Uv for pgsql-admin@lists.postgresql.org; Tue, 13 Feb 2024 18:30:16 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rZxXm-006a6w-41 for pgsql-admin@lists.postgresql.org; Tue, 13 Feb 2024 18:30:15 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 41DIU8252658643; Tue, 13 Feb 2024 13:30:08 -0500 From: Tom Lane To: =?UTF-8?B?0JDQvdGC0L7QvSDQk9C70YPRiNCw0LrQvtCy?= cc: pgsql-admin@lists.postgresql.org Subject: Re: pg_dump --binary-upgrade out of memory In-reply-to: References: Comments: In-reply-to =?UTF-8?B?0JDQvdGC0L7QvSDQk9C70YPRiNCw0LrQvtCy?= message dated "Mon, 12 Feb 2024 18:36:20 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2658641.1707849008.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 13 Feb 2024 13:30:08 -0500 Message-ID: <2658642.1707849008@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk =3D?UTF-8?B?0JDQvdGC0L7QvSDQk9C70YPRiNCw0LrQvtCy?=3D writes: > I encountered the problem of not being able to upgrade my instance (14->= 15) > via pg_upgrade. > The utility crashed with an error in out of memory. > After researching a bit I found that this happens at the moment of expor= t > schema with pg_dump. > Then I tried to manually perform a dump schema with the parameter > --binary-upgrade option and also got an out of memory. > Digging a little deeper, I discovered quite a large number of blob objec= ts > in the database (pg_largeobject 10GB and pg_largeobject_metadata 1GB (31= kk > rows)) Yeah, dumping a database with a lot of blobs is a known pain point. I have some patches in progress that intend to make that better [1], but they're meant for v17 and I'm not sure if you could get them to work in v15. In the meantime, trying to run pg_dump on a beefier machine might be your best option. regards, tom lane [1] https://commitfest.postgresql.org/47/4713/