pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: senor <frio_cervesa@hotmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Optimize pg_dump schema-only
Date: Sun, 28 Apr 2019 23:54:37 +0000
Message-ID: <BYAPR01MB370162C9F91E8CBB1F4429DCF7380@BYAPR01MB3701.prod.exchangelabs.com> (raw)
In-Reply-To: <17505fec-be0a-526a-9ee5-18bb0408a62a@gmail.com>
References: <BYAPR01MB3701AF2EFA014CC16EA14119F7380@BYAPR01MB3701.prod.exchangelabs.com>
	<17505fec-be0a-526a-9ee5-18bb0408a62a@gmail.com>

I know from a previous post to the community that pg_dump --schema-only is single threaded and the --jobs option cannot benefit pg_dump in my case (single DB, Single schema, 100000+ tables). Using pg_upgrade with the --link option is very fast except for the pg_dump portion of the upgrade which takes days.

I think I am looking for advice on how to optimize the postgres process for best performance of a single thread making whatever queries pg_dump --schema-only does. Obviously, that's not a common concern for DB tuning.  At the moment, all I'm reasonably sure about is that a reduction in the number of tables should reduce the time needed but that is not the reality I'm faced with.

Thanks,
Senor

On 4/28/2019 14:08, Ron wrote:
On 4/28/19 3:21 PM, senor wrote:
Hi All,

I'm looking for advice for optimizing the pg_dump portion of "pg_upgrade
--link". Since this schema only dump can't take advantage of parallel
processing with jobs I'm looking for any preparation or configuration
settings that can improve speed.

9.2 to 9.6
CentOS 6/64bit
512GB

I see only one CPU of 32 doing anything and it's often at 100%. Disk IO
is minimal. Memory use varies but always plenty to spare.

"pg_dump --schema-only" is single-threaded.





view thread (8+ messages)  latest in thread

Message-ID: <BYAPR01MB370162C9F91E8CBB1F4429DCF7380@BYAPR01MB3701.prod.exchangelabs.com>
Permalink:  ../BYAPR01MB370162C9F91E8CBB1F4429DCF7380@BYAPR01MB3701.prod.exchangelabs.com/
Also on:    postgresql.org/message-id/BYAPR01MB370162C9F91E8CBB1F4429DCF7380@BYAPR01MB3701.prod.exchangelabs.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: frio_cervesa@hotmail.com
  Subject: Re: Optimize pg_dump schema-only
  In-Reply-To: <BYAPR01MB370162C9F91E8CBB1F4429DCF7380@BYAPR01MB3701.prod.exchangelabs.com>
  References: <BYAPR01MB3701AF2EFA014CC16EA14119F7380@BYAPR01MB3701.prod.exchangelabs.com> <17505fec-be0a-526a-9ee5-18bb0408a62a@gmail.com> <BYAPR01MB370162C9F91E8CBB1F4429DCF7380@BYAPR01MB3701.prod.exchangelabs.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