Appendix B. Database Limitations

The following table describes the limits of PostgreSQL

Table B.1. PostgreSQL limitations

ItemLimitComment
Maximum Database SizeUnlimited 
Maximum Number of DatabasesUnlimited 
Maximum Relation Size32 TBLimited to 2^32 - 1 pages per relation. Can be increased by increasing BLCKSZ and recompiling PostgreSQL
Maximum Columns per Table250 - 1600Depending on column types. (More details here)
Maximum Row Size1600 GBAssuming 1600 columns, each 1 GB in size
Maximum Field Size1 GB 
Maximum Identifier Length63 charactersCan be increased by recompiling PostgreSQL
Maximum Rows per TableUnlimited 
Maximum Indexes per TableUnlimited 
Maximum Indexed Columns32Can be increased by recompiling PostgreSQL. Limit includes any INCLUDE columns
Maximum Partition Keys32Can be increased by recompiling PostgreSQL
Maximum Relations per DatabaseUnlimited 
Maximum Partitions per Partitioned Relations268,435,456May be increased by using sub-partitioning