# postgres **Repository Path**: yoveria/postgres ## Basic Information - **Project Name**: postgres - **Description**: 夏季小学期 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-13 - **Last Updated**: 2026-07-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # hnuSQL — 精简版 PostgreSQL 基于 PostgreSQL 20devel 源码提取核心代码构建的精简关系型数据库系统。 ## 仓库结构 ``` ├── hnusql/ 精简版 PostgreSQL 实现 (~50 文件, ~2.8 万行) ├── postgresql/ PostgreSQL 20devel 原始源码 (参考用) ├── scripts/ 辅助脚本 └── README.md ``` ## 构建 ```bash cd hnusql meson setup builddir meson compile -C builddir ``` ## 运行 ```bash # 启动服务器 ./builddir/bin/hnusqld -p 5432 # 交互式 Shell ./builddir/bin/hnusql_shell # 管理工具 ./builddir/bin/hnusql_ctl ping ./builddir/bin/hnusql_ctl version # 备份 ./builddir/bin/hnusql_dump -d mydb ``` ## 设计目标 覆盖 9 项设计要求:存储引擎、引擎接口、数据库管理、备份、日志、 网络协议、线程/内存、查询解析/优化、安全管理。 保留 PostgreSQL 核心架构设计(MemoryContext、火山模型执行器、WAL、MVCC), 同时保持代码精简可读(目标 ~55 文件,~3 万行)。