????
Current Path : C:/opt/pgsql/doc/postgresql/html/ |
Current File : C:/opt/pgsql/doc/postgresql/html/limits.html |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Appendix K. PostgreSQL Limits</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="docguide-style.html" title="J.6. Style Guide" /><link rel="next" href="acronyms.html" title="Appendix L. Acronyms" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Appendix K. <span class="productname">PostgreSQL</span> Limits</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="docguide-style.html" title="J.6. Style Guide">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="appendixes.html" title="Part VIII. Appendixes">Up</a></td><th width="60%" align="center">Part VIII. Appendixes</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="acronyms.html" title="Appendix L. Acronyms">Next</a></td></tr></table><hr /></div><div class="appendix" id="LIMITS"><div class="titlepage"><div><div><h2 class="title">Appendix K. <span class="productname">PostgreSQL</span> Limits</h2></div></div></div><p> <a class="xref" href="limits.html#LIMITS-TABLE" title="Table K.1. PostgreSQL Limitations">Table K.1</a> describes various hard limits of <span class="productname">PostgreSQL</span>. However, practical limits, such as performance limitations or available disk space may apply before absolute hard limits are reached. </p><div class="table" id="LIMITS-TABLE"><p class="title"><strong>Table K.1. <span class="productname">PostgreSQL</span> Limitations</strong></p><div class="table-contents"><table class="table" summary="PostgreSQL Limitations" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Item</th><th>Upper Limit</th><th>Comment</th></tr></thead><tbody><tr><td>database size</td><td>unlimited</td><td> </td></tr><tr><td>number of databases</td><td>4,294,950,911</td><td> </td></tr><tr><td>relations per database</td><td>1,431,650,303</td><td> </td></tr><tr><td>relation size</td><td>32 TB</td><td>with the default <code class="symbol">BLCKSZ</code> of 8192 bytes</td></tr><tr><td>rows per table</td><td>limited by the number of tuples that can fit onto 4,294,967,295 pages</td><td> </td></tr><tr><td>columns per table</td><td>1,600</td><td>further limited by tuple size fitting on a single page; see note below</td></tr><tr><td>columns in a result set</td><td>1,664</td><td> </td></tr><tr><td>field size</td><td>1 GB</td><td> </td></tr><tr><td>indexes per table</td><td>unlimited</td><td>constrained by maximum relations per database</td></tr><tr><td>columns per index</td><td>32</td><td>can be increased by recompiling <span class="productname">PostgreSQL</span></td></tr><tr><td>partition keys</td><td>32</td><td>can be increased by recompiling <span class="productname">PostgreSQL</span></td></tr><tr><td>identifier length</td><td>63 bytes</td><td>can be increased by recompiling <span class="productname">PostgreSQL</span></td></tr><tr><td>function arguments</td><td>100</td><td>can be increased by recompiling <span class="productname">PostgreSQL</span></td></tr><tr><td>query parameters</td><td>65,535</td><td> </td></tr></tbody></table></div></div><br class="table-break" /><p> The maximum number of columns for a table is further reduced as the tuple being stored must fit in a single 8192-byte heap page. For example, excluding the tuple header, a tuple made up of 1,600 <code class="type">int</code> columns would consume 6400 bytes and could be stored in a heap page, but a tuple of 1,600 <code class="type">bigint</code> columns would consume 12800 bytes and would therefore not fit inside a heap page. Variable-length fields of types such as <code class="type">text</code>, <code class="type">varchar</code>, and <code class="type">char</code> can have their values stored out of line in the table's TOAST table when the values are large enough to require it. Only an 18-byte pointer must remain inside the tuple in the table's heap. For shorter length variable-length fields, either a 4-byte or 1-byte field header is used and the value is stored inside the heap tuple. </p><p> Columns that have been dropped from the table also contribute to the maximum column limit. Moreover, although the dropped column values for newly created tuples are internally marked as null in the tuple's null bitmap, the null bitmap also occupies space. </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="docguide-style.html" title="J.6. Style Guide">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendixes.html" title="Part VIII. Appendixes">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="acronyms.html" title="Appendix L. Acronyms">Next</a></td></tr><tr><td width="40%" align="left" valign="top">J.6. Style Guide </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> Appendix L. Acronyms</td></tr></table></div></body></html>