PostgreSQL 流复制 1 主 1 从集群,从节点多余一个不知道作用的文件 16539.1 - V2EX
oldsix2

PostgreSQL 流复制 1 主 1 从集群,从节点多余一个不知道作用的文件 16539.1

  •  
  •   oldsix2 Jun 13, 2023 2175 views
    This topic created in 1076 days ago, the information mentioned may be changed or developed.

    PostgreSQL 流复制 1 主 1 从集群,从节点 database 目录大于 主节点 database 目录

    1 、主节点

    # du -h base/16525 3.0G base/16525 # ls -ahlS base/16525 | head -10 total 3.0G -rw------- 1 postgres postgres 1.0G Jun 13 13:25 16608 -rw------- 1 postgres postgres 1.0G Jun 13 13:25 16608.1 -rw------- 1 postgres postgres 514M Jun 13 13:29 16608.2 -rw------- 1 postgres postgres 429M Jun 13 13:25 16611 -rw------- 1 postgres postgres 6.0M Jun 13 13:23 17111 -rw------- 1 postgres postgres 808K Jun 13 11:29 16680 -rw------- 1 postgres postgres 664K Jun 13 13:45 16608_fsm -rw------- 1 postgres postgres 568K Jun 13 13:23 16619 -rw------- 1 postgres postgres 528K Jun 12 20:26 16779 

    2 、从节点

    # du -h base/16525/ 3.2G base/16525/ # ls -ahlS base/16525 | head -10 total 3.2G -rw------- 1 postgres postgres 1.0G Jun 13 13:25 16608 -rw------- 1 postgres postgres 1.0G Jun 13 13:25 16608.1 -rw------- 1 postgres postgres 514M Jun 13 13:34 16608.2 -rw------- 1 postgres postgres 429M Jun 13 13:25 16611 -rw------- 1 postgres postgres 257M Jun 9 14:22 16539.1 -rw------- 1 postgres postgres 6.0M Jun 13 13:16 17111 -rw------- 1 postgres postgres 808K Jun 13 11:29 16680 -rw------- 1 postgres postgres 664K Jun 13 13:34 16608_fsm -rw------- 1 postgres postgres 568K Jun 13 13:16 16619 

    肉眼看起来是从节点多了 16539.1 文件,257M ,所以从节点目录大于主节点 0.2G 。 ls | grep 16539 这个 oid ,只存在 16539.1 一个文件

    ls -ahlS base/16525 | grep 16539 -rw------- 1 postgres postgres 257M Jun 9 14:22 16539.1 

    sql 也查不到

    test=# SELECT relname FROM pg_class WHERE pg_relation_filepath(oid) = 'base/16525/16539'; relname --------- (0 rows) 

    怎么排查呢?哪位大佬知道吗

    6 replies    2023-06-15 17:20:36 +08:00
    oldsix2
      nbsp; 1
    oldsix2  
    OP
       Jun 13, 2023
    更新,是主节点 vacuum full tablename 之后,主节点回收了磁盘空间。从节点多了这个不明文件
    oldsix2
        2
    oldsix2  
    OP
       Jun 13, 2023   1
    结案了,15.0 版本的 bug 。15.1 的 changelog 里修复了。

    https://www.postgresql.org/docs/15/release-15-1.html#id-1.11.6.7.5
    wingor2015
        3
    wingor2015  
       Jun 13, 2023
    学习了
    dw2693734d
        4
    dw2693734d  
       Jun 13, 2023
    还在用 14
    oldsix2
        5
    oldsix2  
    OP
       Jun 13, 2023   1
    @wingor2015 互相学习

    @dw2693734d 刚好给你排个雷,嘿嘿
    wingor2015
        6
    wingor2015  
       Jun 15, 2023
    我们还在用 9.6 。。。
    About     Help     Advertise     Blog     API     FAQ     Solana     6044 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 37ms UTC 02:28 PVG 10:28 LAX 19:28 JFK 22:28
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86