GBASE南大通用数据库GBase 8s常见问题讲堂 -- no more pages/no more extents

本文摘自GBASE南大通用社区,by:wty,原文请点击:GBase 8s常见问题 -- no more pages/no more extents|GBASE社区|天津南大通用数据技术股份有限公司|GBASE-致力于成为用户最信赖的数据库产品供应商

问题现象

insert数据失败,报错no more pages或no more extents

onstat -d查看表所在的dbspace还有剩余空间

解决方法

可能是表占用的page达到上限

执行命令查询表的空间分配情况

[gbasedbt@test ~]$ oncheck -pt  testdb:table1



TBLspace Report for testdb:gbasedbt.table1

    Physical Address               6:104248
    Creation date                  12/10/2023 01:18:09
    TBLspace Flags                 902        Row Locking
                                              TBLspace contains VARCHARS
                                              TBLspace use 4 bit bit-maps
    Maximum row size               5675      
    Number of special columns      12        
    Number of keys                 0         
    Number of extents              1         
    Current serial value           1         
    Current SERIAL8 value          1         
    Current BIGSERIAL value        1         
    Current REFID value            1         
    Pagesize (k)                   16        
    First extent size              4         
    Next extent size               4         
    Number of pages allocated      4         
    Number of pages used           1         
    Number of data pages           0         
    Number of rows                 0         
    Partition partnum              6293704   
    Partition lockid               6293704   

    Extents                       
         Logical Page     Physical Page        Size Physical Pages
                    0          6:119448           4         32
...

Number of pages allocated :已分配page数

Number of pages used :已占用page数

一个非分片表page数上限是16,777,215,如果这两个值已经接近上限,可能无法再分配更多page

另外,extent 的最大数量是 32767,默认分配extend中包含的page会越来越多,一般不会达到上限

如果查询到表分配的page/extend达到上限,导致不能插入数据,则需要将表分片

每个分片都可以包含普通表的page/extend数。

alter fragment on table table1 init
FRAGMENT BY EXPRESSION
id < 100 IN datadbs01,
REMAINDER IN datadbs02;

*注意:建议操作之前备份数据库

"另外,extent 的最大数量是 32767,默认分配extend中包含的page会越来越多,一般不会达到上限"
这个extent的最大数量不是32767。。而是起决于页大小,partition page页的slot 5中每个区段需要10个字节来描述,还需要减掉slot 1,2,3(特殊字段描述、表描述等)和页头页尾的空间占用。在16K页中,大约15K字节可以用于描述区段,所以至多大约达到1500个区段。

你可能感兴趣的:(数据库,GBASE南大通用,GBASE)