pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Karthik Krishnakumar <karthikk@zohocorp.com>
Cc: pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: Max tables in a cluster?
Date: Wed, 5 Apr 2023 12:21:24 +0200
Message-ID: <ZC1LpCz1p6hp0HXO@depesz.com> (raw)
In-Reply-To: <18750398329.1002ca2ba316.8870907212977424118@zohocorp.com>
References: <18750398329.1002ca2ba316.8870907212977424118@zohocorp.com>

On Wed, Apr 05, 2023 at 12:37:41PM +0530, Karthik Krishnakumar wrote:
> Is there a limit to number of tables that a cluster can support? 

Well, yes.

For starters: https://www.postgresql.org/docs/current/limits.html

But more important is: with large number of tables certain operations
become VERY slow. Specifically getting schema dump. Which is used, for
example, by pg_upgrade.

In my experience hitting 1 million rows in pg_class made it
realistically impossible to use pg_dump. But there have been
many improvements to pg_dump over the years
(https://why-upgrade.depesz.com/show?from=9.5&to=15.2&keywords=pg_dump)
to it's possible that the problem is gone now.

Try taking `pg_dump -s` of the db, and see how long it takes...

Best regards,

depesz






view thread (3+ messages)

Message-ID: <ZC1LpCz1p6hp0HXO@depesz.com>
Permalink:  ../ZC1LpCz1p6hp0HXO@depesz.com/
Also on:    postgresql.org/message-id/ZC1LpCz1p6hp0HXO@depesz.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: depesz@depesz.com, karthikk@zohocorp.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Max tables in a cluster?
  In-Reply-To: <ZC1LpCz1p6hp0HXO@depesz.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