pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Flatley <FLATLEYT@outlook.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Max# of tablespaces
Date: Sun, 03 Jan 2021 12:27:04 -0500
Message-ID: <2691846.1609694824@sss.pgh.pa.us> (raw)
In-Reply-To: <MW4PR01MB6099AE82A01616F45C8A1D03C7D30@MW4PR01MB6099.prod.exchangelabs.com>
References: <MW4PR01MB6099AE82A01616F45C8A1D03C7D30@MW4PR01MB6099.prod.exchangelabs.com>

Thomas Flatley <FLATLEYT@outlook.com> writes:
> Hello, I've checked the docs but cant seem to find if there is a max # of tablespaces allowed - I've come across a 9.5 env with 1600 tablespaces - they want to double that - Oracle's max is 64k, I'm not particularly worried about hitting a wall, if there is one , outside of maintenance issues - any assistance would be greatly appreciated.

There's no particular hard limit, though you might start to run into
OID-starvation problems at a billion or so tablespaces.

On the other hand, it's important to realize that a Postgres tablespace
doesn't really *do* anything.  It's just a separate subdirectory.
The only functional reason to use a tablespace is if you can place it
on a separate filesystem.  There is certainly value in being able to
do that --- but I've never heard of systems having more than a few
dozen filesystems mounted.  Hence, the above issue sounds suspiciously
like somebody is expecting Postgres tablespaces to do something they
don't do.

(I suppose if you are working on a system that has limits on the
number of files per directory, or performance problems with large
values of that, then you could use tablespaces as a workaround.
But TBH you'd be better off moving onto a more modern platform.)

			regards, tom lane





view thread (9+ messages)  latest in thread

Message-ID: <2691846.1609694824@sss.pgh.pa.us>
Permalink:  ../2691846.1609694824@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2691846.1609694824@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, FLATLEYT@outlook.com
  Subject: Re: Max# of tablespaces
  In-Reply-To: <2691846.1609694824@sss.pgh.pa.us>
  References: <MW4PR01MB6099AE82A01616F45C8A1D03C7D30@MW4PR01MB6099.prod.exchangelabs.com> <2691846.1609694824@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