pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Massimo Ortensi <mortensi@unimaticaspa.it>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Out of memory error during pg_upgrade in big DB with large objects
Date: Tue, 22 Nov 2022 14:27:09 +0100
Message-ID: <1oxTIr-0073TD-ER@unimaticaspa.it> (raw)
In-Reply-To: <3215516.1669051820@sss.pgh.pa.us>
References: <1ox9nq-005Lel-UF@unimaticaspa.it>
	<3215516.1669051820@sss.pgh.pa.us>

I tried (even if vers 15 is not feasible at the moment as we tested only 
vers 14).

It ended with the same Out of memory failure, just more quickly ( 1 hour 
instead of 12 hours)


Il 21/11/2022 18:30, Tom Lane ha scritto:
> Massimo Ortensi <mortensi@unimaticaspa.it> writes:
>> I'm trying to upgrade a huge DB from postgres 10 to 14
>> This cluster is 70+ TB, with one database having more than 2 billion
>> records in pg_largeobject
>> I'm trying pg_upgrade in hard link mode, but the dump of databas schema
>> phase always fails with
>> pg_dump: error: query failed: out of memory for query result
>> pg_dump: error: query was: SELECT l.oid, (SELECT rolname FROM
>> pg_catalog.pg_roles WHERE oid = l.lomowner) AS rolname, (SELECT
>> pg_catalog.array_agg(acl ORDER BY row_n) FROM (SELECT acl, row_n FROM
> FWIW, this query was rewritten pretty substantially in v15.
> It's still going to produce a row per large object, but it
> should be a lot narrower because most of the ACL-wrangling
> now happens somewhere else.  I don't know if migrating to
> v15 instead of v14 is an option for you, and I can't promise
> that that'd be enough savings to fix it anyway.  But it's
> something to think about.
>
> 			regards, tom lane





view thread (3+ messages)

Message-ID: <1oxTIr-0073TD-ER@unimaticaspa.it>
Permalink:  ../1oxTIr-0073TD-ER@unimaticaspa.it/
Also on:    postgresql.org/message-id/1oxTIr-0073TD-ER@unimaticaspa.it

 · 

reply

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: mortensi@unimaticaspa.it, tgl@sss.pgh.pa.us, pgsql-admin@lists.postgresql.org
  Subject: Re: Out of memory error during pg_upgrade in big DB with large objects
  In-Reply-To: <1oxTIr-0073TD-ER@unimaticaspa.it>

* 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