Home Explore Blog CI



postgresql

1st chunk of `doc/src/sgml/limits.sgml`
9635b18dd92f757a3368a6b35c527a87d130cca128e303380000000100000912
<!-- doc/src/sgml/limits.sgml -->

<appendix id="limits">
 <title><productname>PostgreSQL</productname> Limits</title>

 <para>
  <xref linkend="limits-table"/> describes various hard limits of
  <productname>PostgreSQL</productname>.  However, practical limits, such as
  performance limitations or available disk space may apply before absolute
  hard limits are reached.
 </para>

 <table id="limits-table">
  <title><productname>PostgreSQL</productname> Limitations</title>
  <tgroup cols="3">
   <thead>
    <row>
     <entry>Item</entry>
     <entry>Upper Limit</entry>
     <entry>Comment</entry>
    </row>
   </thead>

   <tbody>
    <row>
     <entry>database size</entry>
     <entry>unlimited</entry>
     <entry></entry>
    </row>

    <row>
     <entry>number of databases</entry>
     <!-- 2^32 - FirstNormalObjectId - 1 -->
     <entry>4,294,950,911</entry>
     <entry></entry>
    </row>

    <row>
     <entry>relations per database</entry>
     <!-- (2^32 - FirstNormalObjectId - 1) / 3 (3 because of the table and the
          two types that are created to go with it) -->
     <entry>1,431,650,303</entry>
     <entry></entry>
    </row>

    <row>
     <entry>relation size</entry>
     <entry>32 TB</entry>
     <entry>with the default <symbol>BLCKSZ</symbol> of 8192 bytes</entry>
    </row>

    <row>
     <entry>rows per table</entry>
     <entry>limited by the number of tuples that can fit onto 4,294,967,295 pages</entry>
     <entry></entry>
    </row>

    <row>
     <entry>columns per table</entry>
     <entry>1,600</entry>
     <entry>further limited by tuple size fitting on a single page; see note
     below</entry>
    </row>

    <row>
     <entry>columns in a result set</entry>
     <entry>1,664</entry>
     <entry></entry>
    </row>

    <row>
     <entry>field size</entry>
     <entry>1 GB</entry>
     <entry></entry>
    </row>

    <row>
     <entry>indexes per table</entry>
     <entry>unlimited</entry>
     <entry>constrained by maximum relations per database</entry>
    </row>

    <row>
     <entry>columns per index</entry>
     <entry>32</entry>
     <entry>can be increased by recompiling <productname>PostgreSQL</productname></entry>
    </row>

    <row>
     <entry>partition keys</entry>
     <entry>32</entry>
     <entry>can be increased by recompiling

Title: PostgreSQL Limits
Summary
This section describes the hard limits of PostgreSQL, including database size, number of databases, relations per database, and other constraints, as well as practical limitations such as performance and available disk space.