摘要: 【参考】 http://mysql.taobao.org/monthly/2015/10/04/ 【备机】 1)startup进程,通知master进程启动walreceiver slotName="postgresql_node102" conninfo=ip,host,用户密码 2) 备机mas 阅读全文
posted @ 2021-10-02 21:56 stupidstan2019 阅读(41) 评论(0) 推荐(0)
摘要: 【测试方法】 select 1; exec_simple_query postgres.c:967 【执行过程】 1)pg_parse_query postgres.c:638 返回值 typedef struct List{ NodeTag type; #T_List int length=1; 阅读全文
posted @ 2021-10-02 18:30 stupidstan2019 阅读(47) 评论(0) 推荐(0)
摘要: 1) 启动和复制流程 2)事务提交等paxos状态机 阅读全文
posted @ 2021-10-01 16:28 stupidstan2019 阅读(43) 评论(0) 推荐(0)
摘要: 【环境】 参考github官网方法 202机器 master:10001 dn_slave:10101 dn_learner: 11001 yum install bison flex libzstd-devel libzstd zstd cmake openssl-devel protobuf-d 阅读全文
posted @ 2021-10-01 00:33 stupidstan2019 阅读(52) 评论(0) 推荐(0)
摘要: 【参考】 https://github.com/citusdata/pg_auto_failover https://zhuanlan.zhihu.com/p/337259025 【环境】 paf1:189 paf2:204 paf3:202 【主要流程】 hostnamectl set-hostn 阅读全文
posted @ 2021-09-30 00:25 stupidstan2019 阅读(264) 评论(0) 推荐(0)
摘要: 【原文】 https://www.cnblogs.com/study-everyday/p/8629100.html 【解决的问题】 1)使用hash%n,增加节点,全部数据都要改变 在一致性hash环上,增加一个节点x,只影响逆时针一个节点 减少一个节点,影响顺时针下一个节点 2)节点数少,只有2 阅读全文
posted @ 2021-09-29 19:20 stupidstan2019 阅读(45) 评论(0) 推荐(0)
摘要: CREATE NODE GROUP ngrp3 WITH (dn1,dn2); CREATE TABLE testgrp3 (id int primary key, note text) DISTRIBUTE BY HASH(id) TO GROUP ngrp3; insert into testg 阅读全文
posted @ 2021-09-29 00:52 stupidstan2019 阅读(125) 评论(0) 推荐(0)
摘要: 【测试环境】 CREATE NODE GROUP ngrp2 WITH (dn1); CREATE TABLE testgrp2 (id int primary key, note text) DISTRIBUTE BY HASH(id) TO GROUP ngrp2; insert into te 阅读全文
posted @ 2021-09-29 00:42 stupidstan2019 阅读(40) 评论(0) 推荐(0)
摘要: 1)插入n条数据 insert into test values(3, 'text'); 2)调用链 320行第一次为0,第二次为1 3)实现原理 3.1)roundRobinNode是一个链表 3.2)如果下一个元素不是队尾,取值 如果是队尾,取队头,顺序遍历 阅读全文
posted @ 2021-09-29 00:21 stupidstan2019 阅读(80) 评论(0) 推荐(0)
摘要: int main(){ int i=0; for(;i<200000;i++){ char *p = new char[1000 * 1000 * 1000]; } cout<<"i="<<i<<endl; } ./b terminate called after throwing an insta 阅读全文
posted @ 2021-09-23 00:53 stupidstan2019 阅读(74) 评论(0) 推荐(0)