From: Tom Lane <tgl@sss.pgh.pa.us>
To: Антон Глушаков <a.glushakov86@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: pg_dump --binary-upgrade out of memory
Date: Tue, 13 Feb 2024 13:30:08 -0500
Message-ID: <2658642.1707849008@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHnOmaeCZN0tOEfmu3VOLjDujfY2jbS0HaEfwTboY1knhfwzvQ@mail.gmail.com>
References: <CAHnOmaeCZN0tOEfmu3VOLjDujfY2jbS0HaEfwTboY1knhfwzvQ@mail.gmail.com>
=?UTF-8?B?0JDQvdGC0L7QvSDQk9C70YPRiNCw0LrQvtCy?= <a.glushakov86@gmail.com> 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 export
> 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 objects
> in the database (pg_largeobject 10GB and pg_largeobject_metadata 1GB (31kk
> 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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, a.glushakov86@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: pg_dump --binary-upgrade out of memory
In-Reply-To: <2658642.1707849008@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox