8

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?

asked Nov 12, 2012 at 14:36
0

2 Answers 2

14

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.

answered Nov 12, 2012 at 20:36
1
  • 8
    Note that non-default block sizes aren't as well tested, though. Bugs have cropped up before. Commented Nov 13, 2012 at 0:51
15

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.

answered Nov 13, 2012 at 0:52
3
  • 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. Commented 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. Commented 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? Commented Dec 6, 2024 at 17:00

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.