I need a free database software and thought of PostgreSQL. But then I read it has a table size limit of 32 terabytes, but I need more (and don't want to spend thousand/millions on high end database software like Oracle).
Is there a way to manually increase that limit? And if so, what is the penalty for doing so?
2 Answers 2
Just use a different setting for the block size:
--with-blocksize=BLOCKSIZE
The default, 8 kilobytes, is suitable for most situations; but other values may be useful in special cases. The value must be a power of 2 between 1 and 32 (kilobytes).
Using 32 kilobytes, your table has a maximum size of 128TB.
-
8Note that non-default block sizes aren't as well tested, though. Bugs have cropped up before.Craig Ringer– Craig Ringer2012年11月13日 00:51:03 +00:00Commented Nov 13, 2012 at 0:51
Frank's answer is entirely correct, but there's more to it.
Don't do this. Partition your table instead. PostgreSQL's table partitioning isn't wonderful, but it's going to be better than a 32TB+ table.
-
This question is now 6 years old i wonder if this is still a thing? Increasing the block-size seems less overhead compared to table partinioning.goulashsoup– goulashsoup2019年09月16日 16:12:05 +00:00Commented Sep 16, 2019 at 16:12
-
2@goulashsoup Actually because of the costs involved in huge b-tree indexes, it's usually cheaper to partition.Craig Ringer– Craig Ringer2019年09月18日 02:25:56 +00:00Commented Sep 18, 2019 at 2:25
-
1@CraigRinger - this question has had more ressurections than Lazarus! :-) Could you expand on the difference between indexes on an 8kb block-size table and one of 32kb blocks?Vérace– Vérace2024年12月06日 17:00:29 +00:00Commented Dec 6, 2024 at 17:00