本文为您介绍PolarDB的相关使用限制。

PolarDB MySQL

节点规格 文件系统占用内存 文件个数上限
polar.mysql.x2.medium 450 MB 1026048
polar.mysql.x4.large 850 MB 2050048
polar.mysql.x4.xlarge
polar.mysql.x8.xlarge
polar.mysql.x8.2xlarge
polar.mysql.x8.4xlarge
polar.mysql.x8.12xlarge
以上表格中的参数解释如下:
  • 文件个数上限:
    包括用户文件、数据库系统库文件(约100个)、日志文件(使用SHOW POLAR LOGS可查看日志文件数量)等。一个普通的PolarDB表占用两个文件,一个分区表占用N+2个文件(N为分区数)。文件数量达到上限后,继续创建表会提示如下错误:
    ERROR 3017 (HY000): Too many files. PolarDB only supports 2048 files every 10GB disk size. Please drop some tables/databases before creating new tables

    此时需要删除部分表或者升级集群规格。

  • 文件系统占用内存:

    当集群达到存储空间上限,且处于正常读写(非性能压测,没有大表DDL)的情况下,文件系统所占用的内存。如果集群没有达到存储空间上限,文件系统占用的内存小于此参数。

表 1. 其他限制
操作 使用约束
设置表名 任意规格集群的字母或数字表名长度不超过64个字符;汉字表名长度不超过50个字符。
Serializable隔离级别 不支持。

PolarDB PostgreSQL

节点规格 文件个数上限
polar.pg.x4.medium 1048576
polar.pg.x4.large 2097152
polar.pg.x4.xlarge 2097152
polar.pg.x8.xlarge 4194304
polar.pg.x8.2xlarge 8388608
polar.pg.x8.4xlarge 12582912
polar.pg.x8.12xlarge 20971520
polar.o.x4.medium 1048576
polar.o.x4.large 2097152
polar.o.x4.xlarge 2097152
polar.o.x8.xlarge 4194304
polar.o.x8.2xlarge 8388608
polar.o.x8.4xlarge 12582912
polar.o.x8.12xlarge 20971520
文件个数上限:包括用户表文件、数据库系统表文件(大约1000个)、日志文件等。一个普通的PolarDB表(非分区表)占用3个文件(数据文件、visibilitymap文件、fsm文件,使用索引的话,每个索引一个文件)。文件数量达到上限后,继续创建表会提示类似以下错误:
could not create file

此时需要删除部分表或者升级集群规格。

表 2. 其他限制
操作 使用约束
数据库的root权限 不提供superuser权限,但提供polar_superuser权限,为superuser权限的子集。
dblink/fdw 不支持。

PolarDB兼容Oracle数据库

节点规格 文件系统占用内存 文件个数上限
polar.mysql.x2.medium 450 MB 1026048
polar.mysql.x4.large 850 MB 2050048
polar.mysql.x4.xlarge
polar.mysql.x8.xlarge
polar.mysql.x8.2xlarge
polar.mysql.x8.4xlarge
polar.mysql.x8.12xlarge
文件个数上限:包括用户表文件、数据库系统表文件(大约1000个)、日志文件等。一个普通的PolarDB表(非分区表)占用3个文件(数据文件、visibilitymap文件、fsm文件,使用索引的话,每个索引一个文件)。文件数量达到上限后,继续创建表会提示类似以下错误:
could not create file

此时需要删除部分表或者升级集群规格。

表 3. 其他限制
操作 使用约束
数据库的root权限 不提供superuser权限,但提供polar_superuser权限,为superuser权限的子集。
dblink/fdw 不支持。