跳到主要内容
版本:2.x

pg_attribute_encoding

pg_catalog 模式下的 pg_attribute_encoding 系统目录表记录了列存储的相关信息。

列名类型修饰符存储方式描述
attrelidoidnot nullplain外键,关联至 pg_attribute.attrelid
attnumsmallintnot nullplain外键,关联至 pg_attribute.attnum
filenumsmallintnot nullplain列的文件编号
attoptionstext[]extended列的存储选项

当列的 filenum 值为 f 时,磁盘上的列文件会使用 (f - 1)*128f*128 - 1 的后缀。例如:

  • filenum = 1,则文件名为 relfilenoderelfilenode.1 ... relfilenode.127
  • filenum = 2,则文件名为 relfilenode.128relfilenode.129 ... relfilenode.255
  • filenum = 3,则文件名为 relfilenode.256relfilenode.257 ... relfilenode.383