Re: Max# of tablespaces - Mailing list pgsql-general

From Tom Lane
Subject Re: Max# of tablespaces
Date
Msg-id 2691846.1609694824@sss.pgh.pa.us
Whole thread Raw
In response to Max# of tablespaces  (Thomas Flatley <FLATLEYT@outlook.com>)
Responses RE: Max# of tablespaces
List pgsql-general
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.5env with 1600 tablespaces - they want to double that - Oracle's max is 64k, I'm not particularly worried about
hittinga 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



pgsql-general by date:

Previous
From: Thiemo Kellner
Date:
Subject: Possible trigger bug? function call argument literalised
Next
From: Rob Sargent
Date:
Subject: Re: Possible trigger bug? function call argument literalised