pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: pg_upgrade and schema complexity...
Date: Fri, 2 Jun 2023 20:06:15 -0500
Message-ID: <605d689c-7f3c-6ce6-1cfd-8a1511206dec@gmail.com> (raw)
In-Reply-To: <9648047c-1895-2480-c1af-164672a3188e@aklaver.com>
References: <6185dd27-b3d3-b594-33fc-58345df79a13@gmail.com>
	<9648047c-1895-2480-c1af-164672a3188e@aklaver.com>

On 6/2/23 19:58, Adrian Klaver wrote:
> On 6/2/23 17:44, Ron wrote:
>> Ran into this when upgrading from 13.11 to 15.3...
>>
>> The pg_restore phase failed with "ERROR: out of shared memory", and 
>> recommended that I increase max_locks_per_transaction. Doing so let the 
>> process run to completion.
>>
>> It took 12.5 minutes to upgrade a 13GB instance.  Soon after, I upgraded 
>> a 78GB cluster, and it only took 3.1 minutes.
>
> Where/how did you measure  those sizes?

Does it really matter?

START_SECS=$(date +"%s")
pg_upgrade ...
FINISH_SECS=$(date +"%s")
ET=`echo "scale=2;(${FINISH_SECS} - ${START_SECS})/60" | bc`
date +"%F %T pg_upgrade finished.  Elapsed time: ${ET} minutes."

(Text copied between air-gapped computers, so there might be errors.)

>>
>> (Both are VMs (same number of CPUs and RAM) connected to the same SAN.)
>>
>> A "pg_dump --schema-only" of the two systems shows that the 
>> small-but-slow schema is 5.9M lines.
>
> Anything special you are doing in this cluster to create all those lines?

I do nothing; the schema is provided by the vendor.

>
> What is the line count for the other instance?

227K rows.

>>
>> Is this to be expected of such a huge schema?
>>

-- 
Born in Arizona, moved to Babylonia.





view thread (6+ messages)  latest in thread

Message-ID: <605d689c-7f3c-6ce6-1cfd-8a1511206dec@gmail.com>
Permalink:  ../605d689c-7f3c-6ce6-1cfd-8a1511206dec@gmail.com/
Also on:    postgresql.org/message-id/605d689c-7f3c-6ce6-1cfd-8a1511206dec@gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: pg_upgrade and schema complexity...
  In-Reply-To: <605d689c-7f3c-6ce6-1cfd-8a1511206dec@gmail.com>
  References: <6185dd27-b3d3-b594-33fc-58345df79a13@gmail.com> <9648047c-1895-2480-c1af-164672a3188e@aklaver.com> <605d689c-7f3c-6ce6-1cfd-8a1511206dec@gmail.com>

* 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