pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedMax# of tablespaces
9+ messages / 6 participants
[nested] [flat]
* Max# of tablespaces
@ 2021-01-03 12:59 Thomas Flatley <FLATLEYT@outlook.com>
0 siblings, 2 replies; 9+ messages in thread
From: Thomas Flatley @ 2021-01-03 12:59 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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.
thanks
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Max# of tablespaces
@ 2021-01-03 16:51 Andreas Kretschmer <andreas@a-kretschmer.de>
parent: Thomas Flatley <FLATLEYT@outlook.com>
1 sibling, 1 reply; 9+ messages in thread
From: Andreas Kretschmer @ 2021-01-03 16:51 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org,Thomas Flatley <FLATLEYT@outlook.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On 3 January 2021 13:59:31 CET, Thomas Flatley <FLATLEYT@outlook.com> wrote:
>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
why on earth do you think you will need so many tablespaces? They have an other meaning than in oracle.
--
2ndQuadrant - The PostgreSQL Support Company
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Max# of tablespaces
@ 2021-01-03 17:27 Tom Lane <tgl@sss.pgh.pa.us>
parent: Thomas Flatley <FLATLEYT@outlook.com>
1 sibling, 1 reply; 9+ messages in thread
From: Tom Lane @ 2021-01-03 17:27 UTC (permalink / raw)
To: Thomas Flatley <FLATLEYT@outlook.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 9+ messages in thread
* RE: Max# of tablespaces
@ 2021-01-03 17:37 Thomas Flatley <FLATLEYT@outlook.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Flatley @ 2021-01-03 17:37 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Excellent - thanks for the fast response - it was an oracle dba that set it up initially so that may explain it -
Thanks very much
-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Sunday, January 3, 2021 12:27 PM
To: Thomas Flatley <FLATLEYT@outlook.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Max# of tablespaces
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
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Max# of tablespaces
@ 2021-01-05 19:38 Bruce Momjian <bruce@momjian.us>
parent: Thomas Flatley <FLATLEYT@outlook.com>
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Momjian @ 2021-01-05 19:38 UTC (permalink / raw)
To: Thomas Flatley <FLATLEYT@outlook.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Sun, Jan 3, 2021 at 05:37:52PM +0000, Thomas Flatley wrote:
> Excellent - thanks for the fast response - it was an oracle dba that set it up initially so that may explain it -
Agreed. It was probably done that way for an invalid reason and should
be cleaned up.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com
The usefulness of a cup is in its emptiness, Bruce Lee
^ permalink raw reply [nested|flat] 9+ messages in thread
* RE: Max# of tablespaces
@ 2021-01-05 21:55 Thomas Flatley <FLATLEYT@outlook.com>
parent: Andreas Kretschmer <andreas@a-kretschmer.de>
0 siblings, 2 replies; 9+ messages in thread
From: Thomas Flatley @ 2021-01-05 21:55 UTC (permalink / raw)
To: Andreas Kretschmer <andreas@a-kretschmer.de>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
I don’t, but I didn’t set up the env
As far as I can tell, each tablespace is a partition, and I assume they felt this was the best way to perform partition maintenance - again, I don’t know ,
-----Original Message-----
From: Andreas Kretschmer <andreas@a-kretschmer.de>
Sent: Sunday, January 3, 2021 11:52 AM
To: pgsql-general@lists.postgresql.org; Thomas Flatley <FLATLEYT@outlook.com>; pgsql-general@lists.postgresql.org
Subject: Re: Max# of tablespaces
On 3 January 2021 13:59:31 CET, Thomas Flatley <FLATLEYT@outlook.com> wrote:
>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
why on earth do you think you will need so many tablespaces? They have an other meaning than in oracle.
--
2ndQuadrant - The PostgreSQL Support Company
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Max# of tablespaces
@ 2021-01-05 22:01 Christophe Pettus <xof@thebuild.com>
parent: Thomas Flatley <FLATLEYT@outlook.com>
1 sibling, 1 reply; 9+ messages in thread
From: Christophe Pettus @ 2021-01-05 22:01 UTC (permalink / raw)
To: Thomas Flatley <FLATLEYT@outlook.com>; +Cc: Andreas Kretschmer <andreas@a-kretschmer.de>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
> On Jan 5, 2021, at 13:55, Thomas Flatley <FLATLEYT@outlook.com> wrote:
>
> As far as I can tell, each tablespace is a partition, and I assume they felt this was the best way to perform partition maintenance - again, I don’t know ,
It's a very common Oracle-ism to have a lot of tablespaces, in part because (IIRC) Oracle makes it an incredible pain in the neck to add tablespaces once the DB is in use. For sharding purposes, you probably want schemas in PostgreSQL instead of tablespaces, although having that many schemas is going to not be optimal, either.
--
-- Christophe Pettus
xof@thebuild.com
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Max# of tablespaces
@ 2021-01-05 22:02 Ron <ronljohnsonjr@gmail.com>
parent: Thomas Flatley <FLATLEYT@outlook.com>
1 sibling, 0 replies; 9+ messages in thread
From: Ron @ 2021-01-05 22:02 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
It's certainly the "I only know bash" method of determining which partition
growing the fastest.
On 1/5/21 3:55 PM, Thomas Flatley wrote:
> I don’t, but I didn’t set up the env
>
> As far as I can tell, each tablespace is a partition, and I assume they felt this was the best way to perform partition maintenance - again, I don’t know ,
>
> -----Original Message-----
> From: Andreas Kretschmer <andreas@a-kretschmer.de>
> Sent: Sunday, January 3, 2021 11:52 AM
> To: pgsql-general@lists.postgresql.org; Thomas Flatley <FLATLEYT@outlook.com>; pgsql-general@lists.postgresql.org
> Subject: Re: Max# of tablespaces
>
> On 3 January 2021 13:59:31 CET, Thomas Flatley <FLATLEYT@outlook.com> wrote:
>> 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
> why on earth do you think you will need so many tablespaces? They have an other meaning than in oracle.
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 9+ messages in thread
* RE: Max# of tablespaces
@ 2021-01-05 22:10 Thomas Flatley <FLATLEYT@outlook.com>
parent: Christophe Pettus <xof@thebuild.com>
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Flatley @ 2021-01-05 22:10 UTC (permalink / raw)
To: Christophe Pettus <xof@thebuild.com>; +Cc: Andreas Kretschmer <andreas@a-kretschmer.de>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
I agree - it requires a re-think/re-build
As for oracle, quite easy to add tablepaces in flight, assuming you don’t hit max db_files
I was more curious if there was an actual defined limit - oracle stops at 64K , and their old application release would have 2tbsp per module, and at 400 or so that’s a hassle
-----Original Message-----
From: Christophe Pettus <xof@thebuild.com>
Sent: Tuesday, January 5, 2021 5:02 PM
To: Thomas Flatley <FLATLEYT@outlook.com>
Cc: Andreas Kretschmer <andreas@a-kretschmer.de>; pgsql-general@lists.postgresql.org
Subject: Re: Max# of tablespaces
> On Jan 5, 2021, at 13:55, Thomas Flatley <FLATLEYT@outlook.com> wrote:
>
> As far as I can tell, each tablespace is a partition, and I assume they felt this was the best way to perform partition maintenance - again, I don’t know ,
It's a very common Oracle-ism to have a lot of tablespaces, in part because (IIRC) Oracle makes it an incredible pain in the neck to add tablespaces once the DB is in use. For sharding purposes, you probably want schemas in PostgreSQL instead of tablespaces, although having that many schemas is going to not be optimal, either.
--
-- Christophe Pettus
xof@thebuild.com
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2021-01-05 22:10 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03 12:59 Max# of tablespaces Thomas Flatley <FLATLEYT@outlook.com>
2021-01-03 16:51 ` Andreas Kretschmer <andreas@a-kretschmer.de>
2021-01-05 21:55 ` Thomas Flatley <FLATLEYT@outlook.com>
2021-01-05 22:01 ` Christophe Pettus <xof@thebuild.com>
2021-01-05 22:10 ` Thomas Flatley <FLATLEYT@outlook.com>
2021-01-05 22:02 ` Ron <ronljohnsonjr@gmail.com>
2021-01-03 17:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2021-01-03 17:37 ` Thomas Flatley <FLATLEYT@outlook.com>
2021-01-05 19:38 ` Bruce Momjian <bruce@momjian.us>
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