From efed1dce93520bf33018021e5a85c39ace395b66 Mon Sep 17 00:00:00 2001 From: "dgrowley@gmail.com" Date: Wed, 31 Oct 2018 01:45:41 +1300 Subject: [PATCH v4] Add documentation section appendix detailing some limitations of PostgreSQL --- doc/src/sgml/dblimits.sgml | 132 +++++++++++++++++++++++++++++++++++++++++++++ doc/src/sgml/filelist.sgml | 1 + doc/src/sgml/postgres.sgml | 1 + 3 files changed, 134 insertions(+) create mode 100644 doc/src/sgml/dblimits.sgml diff --git a/doc/src/sgml/dblimits.sgml b/doc/src/sgml/dblimits.sgml new file mode 100644 index 0000000000..de8a5d35bd --- /dev/null +++ b/doc/src/sgml/dblimits.sgml @@ -0,0 +1,132 @@ + + + + Database Limitations + + + The following table describes the limits of + PostgreSQL + + + + <productname>PostgreSQL</productname> limitations + + + + Item + Limit + Comment + + + + + + Maximum database size + Unlimited + + + + + Maximum number of databases + Unlimited + + + + + Maximum relation size + 32 TB + Limited to 2^32 - 1 pages per relation. + + + + Maximum columns per table + 1600 + Further limited by tuple size fitting on a single page. See note + below + + + + Maximum field size + 1 GB + + + + + Maximum identifier length + 63 characters + Can be increased by recompiling + PostgreSQL + + + + Maximum rows per table + Unlimited + + + + + Maximum indexes per table + Unlimited + + + + + Maximum indexed columns + 32 + Can be increased by recompiling + PostgreSQL. Limit includes + any INCLUDE columns + + + + Maximum partition keys + 32 + Can be increased by recompiling + PostgreSQL + + + + Maximum relations per database + Unlimited + + + + + Maximum partitions per partitioned relations + + 268,435,456 + May be increased by using sub-partitioning + + + + +
+ + + + The maximum number of columns for a table is further reduced as the tuple + being stored must fit on a single heap page. Variable length fields such + as TEXT, VARCHAR and + CHAR 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. Often + this can mean the actual maximum number of columns that you can store + inside a table is further reduced as the tuple can become too large to + fit inside a single 8192 byte heap page. For example, excluding the + tuple header, a tuple made up of 1600 INT columns + would consume 6400 bytes and could be stored in a heap page, but a tuple + of 1600 BIGINT columns would consume 12800 bytes, + therefore not fit inside a heap page. + + + + Columns which have been dropped from the table also contribute to the + maximum column limit, although the dropped column values for newly + created tuples are internally marked as NULL in the tuple's null bitmap, + which does occupy space. + + + +
diff --git a/doc/src/sgml/filelist.sgml b/doc/src/sgml/filelist.sgml index 48ac14a838..be8d3d6800 100644 --- a/doc/src/sgml/filelist.sgml +++ b/doc/src/sgml/filelist.sgml @@ -185,6 +185,7 @@ + diff --git a/doc/src/sgml/postgres.sgml b/doc/src/sgml/postgres.sgml index 0070603fc3..369eca61cf 100644 --- a/doc/src/sgml/postgres.sgml +++ b/doc/src/sgml/postgres.sgml @@ -268,6 +268,7 @@ Appendixes &errcodes; + &dblimits; &datetime; &keywords; &features; -- 2.16.2.windows.1