PostgreSQL 硬性限制
https://www.postgresql.org/docs/current/limits.html
在使用 pg 的时候,需要注意一些硬性限制,例如代码中写死的,这里记录一下,方便自己查阅,有的时候直接查阅官网反而因为内容太多导致忘记这些关键内容
| Item | Upper Limit | Comment |
|---|---|---|
| database size | unlimited | |
| number of databases | 4,294,950,911 | |
| relations per database | 1,431,650,303 | |
| relation size | 32 TB | with the default BLCKSZ of 8192 bytes |
| rows per table | limited by the number of tuples that can fit onto 4,294,967,295 pages |
|
| columns per table | 1,600 | further limited by tuple size fitting on a single page; see note below |
| columns in a result set | 1,664 | |
| field size | 1 GB | |
| indexes per table | unlimited | constrained by maximum relations per database |
| columns per index | 32 | can be increased by recompiling PostgreSQL |
| partition keys | 32 | can be increased by recompiling PostgreSQL |
| identifier length | 63 bytes | can be increased by recompiling PostgreSQL |
| function arguments | 100 | can be increased by recompiling PostgreSQL |
| query parameters | 65,535 |
本文由作者按照
CC BY 4.0
进行授权