2023年7月15日

摘要: flex/bison usage in pgsql In regular bison usage, we call yyparse() to get an AST. So, I searched for yyparse in PostgreSQL source code, which eventua 阅读全文
posted @ 2023-07-15 22:09 winter-loo 阅读(71) 评论(0) 推荐(0) 编辑

2023年7月3日

摘要: overview of flex & bison flex manual bison manual BNF language expression : expression '+' expression | expression '-' expression | NUMBER ; After wri 阅读全文
posted @ 2023-07-03 21:17 winter-loo 阅读(194) 评论(0) 推荐(0) 编辑

2023年6月26日

摘要: # 函数 **[transformCreateStmt](https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_utilcmd.c;h=fa647976a69cd9383198e91 阅读全文
posted @ 2023-06-26 19:21 winter-loo 阅读(11) 评论(0) 推荐(0) 编辑

2023年6月25日

摘要: 本文主要分析 lightdb 全局临时表实现时使用到的函数 `ltgtt_create_temp_table`. 1. 通过 `makeNode` 函数创建 `TableLikeClause` 和 `CreateStmt`. ```sql create table lt_gtt_schema_123 阅读全文
posted @ 2023-06-25 20:51 winter-loo 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 通过[这篇文章](https://www.cnblogs.com/lddcool/p/lightdb_node_script.html),我搭建了一个单机分布式集群。在该集群内,可以通过下面这条 sql 语句将普通的带有主键的表改为分布式表: ```sql -- 'id' 为表 'test_tabl 阅读全文
posted @ 2023-06-25 16:18 winter-loo 阅读(9) 评论(0) 推荐(0) 编辑
摘要: # 简介 全局临时表(Global Temporary Table)是数据库中一种特殊类型的表,它在创建时与特定的会话无关,并且可以被多个会话共享和访问。全局临时表的数据只在当前数据库会话的生命周期内可见,并且在会话结束后自动销毁。 全局临时表通常用于临时存储中间结果集或临时数据,以便在会话内部或会 阅读全文
posted @ 2023-06-25 08:17 winter-loo 阅读(21) 评论(1) 推荐(0) 编辑

2023年6月20日

摘要: nethogs 源码分析 这篇文章属于初步分析,以后有时间的话再写的更细点。 以下内容都是针对的 TCP 流量分析。 编译 debug 模式下编译,方便后面调试。 CXXFLAGS='-g -O0 -std=c++11 -Wall -Werror' CFLAGS='-g -O0 -Wall -Wer 阅读全文
posted @ 2023-06-20 19:51 winter-loo 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 流量监控工具 iperf3 nethogs iftop 环境准备 两台服务器: 10.20.137.42, 网卡 em1 10.20.137.41, 网卡 em1 在服务器 42 上跑 iperf 服务端,用于接收数据;在服务器 41 上跑 iperf 客户端,用来发送数据。 on 10.20.13 阅读全文
posted @ 2023-06-20 16:58 winter-loo 阅读(65) 评论(1) 推荐(0) 编辑

2023年6月11日

摘要: 本文章主要介绍我在部署 lightdb 单机多实例集群过程中开发的 shell 脚本,方便后续快速搭建集群。在搭建集群过程中我主要参考了以下文档。 参考文档 lightdb distributed guide 分布式组件 canopy 高可用组件 ltcluster 脚本 node.sh 该脚本运行 阅读全文
posted @ 2023-06-11 22:15 winter-loo 阅读(25) 评论(0) 推荐(0) 编辑
摘要: # lightdb 练习题 1. 在LightDB/PostgreSQL中,有表a,定义为: ```sql create table a(id int primary key, rand int, comm varchar(128)); ``` 如何一条语句生成一张1000万记录的表,且满足id从1 阅读全文
posted @ 2023-06-11 15:31 winter-loo 阅读(36) 评论(0) 推荐(0) 编辑

导航