跳过至内容切换导航[ ](/)[ 登录 ](/login?return_tohttps%3A%2F%2Fgithub.com%2Fviggy28%2Fstreambed)外观设置平台AI 代码创作[GitHub Copilot借助 AI 编写更优质代码](https://github.com/features/copilot)[GitHub Spark构建并部署智能应用](https://github.com/features/spark)[GitHub Models管理并比较提示词](https://github.com/features/models)[MCP Registry新集成外部工具](https://github.com/mcp)开发者工作流[Actions自动化任何工作流](https://github.com/features/actions)[Codespaces即时开发环境](https://github.com/features/codespaces)[Issues规划并跟踪工作](https://github.com/features/issues)[Code Review管理代码变更](https://github.com/features/code-review)应用程序安全[GitHub Advanced Security发现并修复漏洞](https://github.com/security/advanced-security)[代码安全在构建过程中保障代码安全](https://github.com/security/advanced-security/code-security)[密钥保护防患于未然阻止信息泄露](https://github.com/security/advanced-security/secret-protection)探索[为何选择 GitHub](https://github.com/why-github)[文档](https://docs.github.com)[博客](https://github.blog)[更新日志](https://github.blog/changelog)[市场](https://github.com/marketplace)[查看所有功能](https://github.com/features)解决方案按公司规模划分[企业版](https://github.com/enterprise)[中小型团队版](https://github.com/team)[初创企业版](https://github.com/enterprise/startups)[非营利组织版](https://github.com/solutions/industry/nonprofits)按用例划分[应用现代化](https://github.com/solutions/use-case/app-modernization)[DevSecOps](https://github.com/solutions/use-case/devsecops)[DevOps](https://github.com/solutions/use-case/devops)[CI/CD](https://github.com/solutions/use-case/ci-cd)[查看所有用例](https://github.com/solutions/use-case)按行业划分[医疗保健](https://github.com/solutions/industry/healthcare)[金融服务](https://github.com/solutions/industry/financial-services)[制造业](https://github.com/solutions/industry/manufacturing)[政府部门](https://github.com/solutions/industry/government)[查看所有行业](https://github.com/solutions/industry)[查看所有解决方案](https://github.com/solutions)资源按主题探索[AI](https://github.com/resources/articles?topicai)[软件开发](https://github.com/resources/articles?topicsoftware-development)[DevOps](https://github.com/resources/articles?topicdevops)[安全](https://github.com/resources/articles?topicsecurity)[查看所有主题](https://github.com/resources/articles)按类型探索[客户案例](https://github.com/customer-stories)[活动与网络研讨会](https://github.com/resources/events)[电子书与报告](https://github.com/resources/whitepapers)[商业洞察](https://github.com/solutions/executive-insights)[GitHub Skills](https://skills.github.com)支持与服务[文档](https://docs.github.com)[客户支持](https://support.github.com)[社区论坛](https://github.com/orgs/community/discussions)[信任中心](https://github.com/trust-center)[合作伙伴](https://github.com/partners)[查看所有资源](https://github.com/resources)开源社区[GitHub Sponsors资助开源开发者](https://github.com/sponsors)项目[Security Lab](https://securitylab.github.com)[维护者社区](https://maintainers.github.com)[加速器](https://github.com/accelerator)[GitHub Stars](https://stars.github.com)[存档项目](https://archiveprogram.github.com)仓库[主题](https://github.com/topics)[热门趋势](https://github.com/trending)[集合](https://github.com/collections)企业版企业解决方案[企业平台由 AI 驱动的开发者平台](https://github.com/enterprise)可用附加组件[GitHub Advanced Security企业级安全功能](https://github.com/security/advanced-security)[Copilot for Business企业级 AI 功能](https://github.com/features/copilot/copilot-business)[高级支持企业级 24/7 支持](https://github.com/premium-support)[定价](https://github.com/pricing)搜索或跳转至...搜索代码、仓库、用户、问题、拉取请求...搜索清除[搜索语法提示](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)提供反馈我们会阅读每一条反馈并认真对待您的意见。包含我的电子邮件地址以便能与我联系取消 提交反馈保存的搜索使用保存的搜索可更快地筛选结果名称查询要查看所有可用的限定符请参阅我们的[文档](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)。取消 创建保存的搜索[ 登录 ](/login?return_tohttps%3A%2F%2Fgithub.com%2Fviggy28%2Fstreambed)[ 注册 ](/signup?ref_ctaSignupref_locheaderloggedoutref_page%2F%3Cuser-name%3E%2F%3Crepo-name%3Esourceheader-reposource_repoviggy28%2Fstreambed)外观设置重置焦点您已在另一个标签页或窗口中登录。[重新加载]()以刷新您的会话。您已在另一个标签页或窗口中注销。[重新加载]()以刷新您的会话。您已在另一个标签页或窗口中切换账户。[重新加载]()以刷新您的会话。 关闭提醒[ viggy28 ](/viggy28) /[streambed](/viggy28/streambed)公开[ 通知 ](/login?return_to%2Fviggy28%2Fstreambed) 您必须登录才能更改通知设置[ 分支 4 ](/login?return_to%2Fviggy28%2Fstreambed)[ 收藏 93 ](/login?return_to%2Fviggy28%2Fstreambed)[ 代码 ](/viggy28/streambed)[ 问题 5 ](/viggy28/streambed/issues)[ 拉取请求 0 ](/viggy28/streambed/pulls)[ 操作 ](/viggy28/streambed/actions)[ 项目 ](/viggy28/streambed/projects)[ 安全与质量 0 ](/viggy28/streambed/security)[ 洞察 ](/viggy28/streambed/pulse)其他导航选项[ 代码 ](/viggy28/streambed)[ 问题 ](/viggy28/streambed/issues)[ 拉取请求 ](/viggy28/streambed/pulls)[ 操作 ](/viggy28/streambed/actions)[ 项目 ](/viggy28/streambed/projects)[ 安全与质量 ](/viggy28/streambed/security)[ 洞察 ](/viggy28/streambed/pulse)[](/viggy28/streambed)viggy28/streambed主分支[分支](/viggy28/streambed/branches)[标签](/viggy28/streambed/tags)[](/viggy28/streambed/branches)[](/viggy28/streambed/tags)转到文件代码打开更多操作菜单文件夹和文件| 名称 | 名称 | 最后提交消息 | 最后提交日期 ||---|---|---|---|最新提交历史记录[45 次提交](/viggy28/streambed/commits/main/)[](/viggy28/streambed/commits/main/)45 次提交[.github](/viggy28/streambed/tree/main/.github .github)| [.github](/viggy28/streambed/tree/main/.github .github)|[cmd](/viggy28/streambed/tree/main/cmd cmd)| [cmd](/viggy28/streambed/tree/main/cmd cmd)|[config](/viggy28/streambed/tree/main/config config)| [config](/viggy28/streambed/tree/main/config config)|[docs](/viggy28/streambed/tree/main/docs docs)| [docs](/viggy28/streambed/tree/main/docs docs)|[internal](/viggy28/streambed/tree/main/internal internal)| [internal](/viggy28/streambed/tree/main/internal internal)|[scripts](/viggy28/streambed/tree/main/scripts scripts)| [scripts](/viggy28/streambed/tree/main/scripts scripts)|[site](/viggy28/streambed/tree/main/site site)| [site](/viggy28/streambed/tree/main/site site)|[test](/viggy28/streambed/tree/main/test test)| [test](/viggy28/streambed/tree/main/test test)|[.gitignore](/viggy28/streambed/blob/main/.gitignore .gitignore)| [.gitignore](/viggy28/streambed/blob/main/.gitignore .gitignore)|[.goreleaser.yml](/viggy28/streambed/blob/main/.goreleaser.yml .goreleaser.yml)| [.goreleaser.yml](/viggy28/streambed/blob/main/.goreleaser.yml .goreleaser.yml)|[CHANGELOG.md](/viggy28/streambed/blob/main/CHANGELOG.md CHANGELOG.md)| [CHANGELOG.md](/viggy28/streambed/blob/main/CHANGELOG.md CHANGELOG.md)|[CLAUDE.md](/viggy28/streambed/blob/main/CLAUDE.md CLAUDE.md)| [CLAUDE.md](/viggy28/streambed/blob/main/CLAUDE.md CLAUDE.md)|[CONTRIBUTING.md](/viggy28/streambed/blob/main/CONTRIBUTING.md CONTRIBUTING.md)| [CONTRIBUTING.md](/viggy28/streambed/blob/main/CONTRIBUTING.md CONTRIBUTING.md)|[LICENSE](/viggy28/streambed/blob/main/LICENSE LICENSE)| [LICENSE](/viggy28/streambed/blob/main/LICENSE LICENSE)|[README.md](/viggy28/streambed/blob/main/README.md README.md)| [README.md](/viggy28/streambed/blob/main/README.md README.md)|[architecture.svg](/viggy28/streambed/blob/main/architecture.svg architecture.svg)| [architecture.svg](/viggy28/streambed/blob/main/architecture.svg architecture.svg)|[docker-compose.yml](/viggy28/streambed/blob/main/docker-compose.yml docker-compose.yml)| [docker-compose.yml](/viggy28/streambed/blob/main/docker-compose.yml docker-compose.yml)|[go.mod](/viggy28/streambed/blob/main/go.mod go.mod)| [go.mod](/viggy28/streambed/blob/main/go.mod go.mod)|[go.sum](/viggy28/streambed/blob/main/go.sum go.sum)| [go.sum](/viggy28/streambed/blob/main/go.sum go.sum)|查看所有文件仓库文件导航- README- 贡献指南- Apache 2.0 许可证Streambed[](https://github.com/viggy28/streambed/actions/workflows/ci.yml)[](https://pkg.go.dev/github.com/viggy28/streambed)[](/viggy28/streambed/blob/main/LICENSE)这是一个从 Postgres 到 Iceberg 的变更数据捕获CDC引擎。无需更改应用程序即可将分析查询从生产数据库中卸载出来。Streambed 通过逻辑复制流式传输 WAL 变更将 Parquet 文件写入 S3并提交 Iceberg 元数据。你可以使用任何与 Iceberg 兼容的引擎查询结果也可以使用内置的查询服务器它支持 Postgres 有线协议因此你可以使用 psql 进行连接。查看实际效果对 pgbench100 万个账户50 万条历史记录执行相同的分析查询。左侧是 Postgres右侧是 Streambed。[](/viggy28/streambed/blob/main/docs/demo.gif)无需 ETL无需 Spark只需 Postgres S3。快速开始# 在本地启动 Postgres MinIOdocker compose up -d# 构建go build -o streambed ./cmd/streambed# 在 :5433 端口启动同步和查询服务器./streambed sync \ --source-urlpostgres://postgres:testlocalhost:5432/postgres \ --s3-bucketstreambed \ --s3-endpointhttp://localhost:9000 \ --s3-prefixtest \ --query-addr:5433# 通过 Iceberg 查询你的 Postgres 表psql -h localhost -p 5433 -U postgres -d postgres运行 streambed sync --help 可查看所有配置选项。所有标志都支持以 STREAMBED_ 为前缀的环境变量例如 STREAMBED_SOURCE_URL。架构[](/viggy28/streambed/blob/main/docs/architecture.svg)工作原理Postgres WAL ──▶ 解码 ──▶ 缓冲 ──▶ Parquet ──▶ S3 ──▶ Iceberg 提交│DuckDB ◀──┘ (查询服务器)Streambed 作为逻辑复制订阅者连接到 Postgres。它解码 WAL 消息插入、更新、删除按表缓冲行并定期将它们作为 Parquet 文件刷新到 S3 并提交 Iceberg 元数据。更新和删除操作会对现有的 Parquet 数据进行写时复制合并。查询服务器使用嵌入式 DuckDB 通过 Postgres 有线协议公开 Iceberg 表因此你可以使用 psql 或任何 Postgres 客户端进行查询。命令| 命令 | 功能 || --- | --- || streambed sync | 主守护进程。流式传输 WAL写入 Iceberg可选择提供查询服务。 || streambed resync --tablepublic.users | 通过 COPY 在一致的快照下进行一次性回填。 || streambed query | 独立查询服务器不进行同步。指向现有的 Iceberg 表。 || streambed cleanup --tablepublic.users | 删除表的 S3 对象和状态。在 resync 之前使用很有用。 |开发需要 Go 1.22 及以上版本和 CGO用于 go-duckdb 和 go-sqlite3。# 构建go build -o streambed ./cmd/streambed# 单元测试go test ./internal/... ./config/...# 集成测试需要 Docker./scripts/test-integration.sh集成测试使用 integration 构建标签并针对 test/integration/docker-compose.yml 中的 Postgres端口 5434和 MinIO端口 9002运行。关于通过逻辑复制将 Postgres 流式传输到 S3 上的 Apache Iceberg并可通过 Postgres 有线协议进行查询。[streambed.dev/](https://streambed.dev/ https://streambed.dev/)主题[ postgres ](/topics/postgres 主题postgres) [ s3 ](/topics/s3 主题s3) [ parquet ](/topics/parquet 主题parquet) [ iceberg ](/topics/iceberg 主题iceberg) [ duckdb ](/topics/duckdb 主题duckdb)资源- Readme许可证Apache 2.0 许可证贡献贡献指南哎呀加载时出现错误。[请重新加载此页面]()[ 活动](/viggy28/streambed/activity)收藏[93个收藏](/viggy28/streambed/stargazers)关注者[0个关注者](/viggy28/streambed/watchers)分支[4个分支](/viggy28/streambed/forks)[ 举报仓库 ](/contact/report-content?content_urlhttps%3A%2F%2Fgithub.com%2Fviggy28%2Fstreambedreportviggy28%28用户%29)[发布版本](/viggy28/streambed/releases)未发布任何版本[包 0](/users/viggy28/packages?repo_namestreambed)哎呀加载时出现错误。[请重新加载此页面]()[贡献者](/viggy28/streambed/graphs/contributors)- - -哎呀加载时出现错误。[请重新加载此页面]()语言- [ Go 99.9% ](/viggy28/streambed/search?lgo)- 其他 0.1%页脚[ ](https://github.com) © 2026 GitHub, Inc.页脚导航- [条款](https://docs.github.com/site-policy/github-terms/github-terms-of-service)- [隐私](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)- [安全](https://github.com/security)- [状态](https://www.githubstatus.com/)- [社区](https://github.community/)- [文档](https://docs.github.com/)- [联系我们](https://support.github.com?tagsdotcom-footer)- 管理 Cookie- 不共享我的个人信息此时你无法执行该操作。
Streambed:免 ETL 和 Spark,实现 Postgres 到 Iceberg 变更数据捕获与查询!
发布时间:2026/6/1 12:12:10
跳过至内容切换导航[ ](/)[ 登录 ](/login?return_tohttps%3A%2F%2Fgithub.com%2Fviggy28%2Fstreambed)外观设置平台AI 代码创作[GitHub Copilot借助 AI 编写更优质代码](https://github.com/features/copilot)[GitHub Spark构建并部署智能应用](https://github.com/features/spark)[GitHub Models管理并比较提示词](https://github.com/features/models)[MCP Registry新集成外部工具](https://github.com/mcp)开发者工作流[Actions自动化任何工作流](https://github.com/features/actions)[Codespaces即时开发环境](https://github.com/features/codespaces)[Issues规划并跟踪工作](https://github.com/features/issues)[Code Review管理代码变更](https://github.com/features/code-review)应用程序安全[GitHub Advanced Security发现并修复漏洞](https://github.com/security/advanced-security)[代码安全在构建过程中保障代码安全](https://github.com/security/advanced-security/code-security)[密钥保护防患于未然阻止信息泄露](https://github.com/security/advanced-security/secret-protection)探索[为何选择 GitHub](https://github.com/why-github)[文档](https://docs.github.com)[博客](https://github.blog)[更新日志](https://github.blog/changelog)[市场](https://github.com/marketplace)[查看所有功能](https://github.com/features)解决方案按公司规模划分[企业版](https://github.com/enterprise)[中小型团队版](https://github.com/team)[初创企业版](https://github.com/enterprise/startups)[非营利组织版](https://github.com/solutions/industry/nonprofits)按用例划分[应用现代化](https://github.com/solutions/use-case/app-modernization)[DevSecOps](https://github.com/solutions/use-case/devsecops)[DevOps](https://github.com/solutions/use-case/devops)[CI/CD](https://github.com/solutions/use-case/ci-cd)[查看所有用例](https://github.com/solutions/use-case)按行业划分[医疗保健](https://github.com/solutions/industry/healthcare)[金融服务](https://github.com/solutions/industry/financial-services)[制造业](https://github.com/solutions/industry/manufacturing)[政府部门](https://github.com/solutions/industry/government)[查看所有行业](https://github.com/solutions/industry)[查看所有解决方案](https://github.com/solutions)资源按主题探索[AI](https://github.com/resources/articles?topicai)[软件开发](https://github.com/resources/articles?topicsoftware-development)[DevOps](https://github.com/resources/articles?topicdevops)[安全](https://github.com/resources/articles?topicsecurity)[查看所有主题](https://github.com/resources/articles)按类型探索[客户案例](https://github.com/customer-stories)[活动与网络研讨会](https://github.com/resources/events)[电子书与报告](https://github.com/resources/whitepapers)[商业洞察](https://github.com/solutions/executive-insights)[GitHub Skills](https://skills.github.com)支持与服务[文档](https://docs.github.com)[客户支持](https://support.github.com)[社区论坛](https://github.com/orgs/community/discussions)[信任中心](https://github.com/trust-center)[合作伙伴](https://github.com/partners)[查看所有资源](https://github.com/resources)开源社区[GitHub Sponsors资助开源开发者](https://github.com/sponsors)项目[Security Lab](https://securitylab.github.com)[维护者社区](https://maintainers.github.com)[加速器](https://github.com/accelerator)[GitHub Stars](https://stars.github.com)[存档项目](https://archiveprogram.github.com)仓库[主题](https://github.com/topics)[热门趋势](https://github.com/trending)[集合](https://github.com/collections)企业版企业解决方案[企业平台由 AI 驱动的开发者平台](https://github.com/enterprise)可用附加组件[GitHub Advanced Security企业级安全功能](https://github.com/security/advanced-security)[Copilot for Business企业级 AI 功能](https://github.com/features/copilot/copilot-business)[高级支持企业级 24/7 支持](https://github.com/premium-support)[定价](https://github.com/pricing)搜索或跳转至...搜索代码、仓库、用户、问题、拉取请求...搜索清除[搜索语法提示](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)提供反馈我们会阅读每一条反馈并认真对待您的意见。包含我的电子邮件地址以便能与我联系取消 提交反馈保存的搜索使用保存的搜索可更快地筛选结果名称查询要查看所有可用的限定符请参阅我们的[文档](https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax)。取消 创建保存的搜索[ 登录 ](/login?return_tohttps%3A%2F%2Fgithub.com%2Fviggy28%2Fstreambed)[ 注册 ](/signup?ref_ctaSignupref_locheaderloggedoutref_page%2F%3Cuser-name%3E%2F%3Crepo-name%3Esourceheader-reposource_repoviggy28%2Fstreambed)外观设置重置焦点您已在另一个标签页或窗口中登录。[重新加载]()以刷新您的会话。您已在另一个标签页或窗口中注销。[重新加载]()以刷新您的会话。您已在另一个标签页或窗口中切换账户。[重新加载]()以刷新您的会话。 关闭提醒[ viggy28 ](/viggy28) /[streambed](/viggy28/streambed)公开[ 通知 ](/login?return_to%2Fviggy28%2Fstreambed) 您必须登录才能更改通知设置[ 分支 4 ](/login?return_to%2Fviggy28%2Fstreambed)[ 收藏 93 ](/login?return_to%2Fviggy28%2Fstreambed)[ 代码 ](/viggy28/streambed)[ 问题 5 ](/viggy28/streambed/issues)[ 拉取请求 0 ](/viggy28/streambed/pulls)[ 操作 ](/viggy28/streambed/actions)[ 项目 ](/viggy28/streambed/projects)[ 安全与质量 0 ](/viggy28/streambed/security)[ 洞察 ](/viggy28/streambed/pulse)其他导航选项[ 代码 ](/viggy28/streambed)[ 问题 ](/viggy28/streambed/issues)[ 拉取请求 ](/viggy28/streambed/pulls)[ 操作 ](/viggy28/streambed/actions)[ 项目 ](/viggy28/streambed/projects)[ 安全与质量 ](/viggy28/streambed/security)[ 洞察 ](/viggy28/streambed/pulse)[](/viggy28/streambed)viggy28/streambed主分支[分支](/viggy28/streambed/branches)[标签](/viggy28/streambed/tags)[](/viggy28/streambed/branches)[](/viggy28/streambed/tags)转到文件代码打开更多操作菜单文件夹和文件| 名称 | 名称 | 最后提交消息 | 最后提交日期 ||---|---|---|---|最新提交历史记录[45 次提交](/viggy28/streambed/commits/main/)[](/viggy28/streambed/commits/main/)45 次提交[.github](/viggy28/streambed/tree/main/.github .github)| [.github](/viggy28/streambed/tree/main/.github .github)|[cmd](/viggy28/streambed/tree/main/cmd cmd)| [cmd](/viggy28/streambed/tree/main/cmd cmd)|[config](/viggy28/streambed/tree/main/config config)| [config](/viggy28/streambed/tree/main/config config)|[docs](/viggy28/streambed/tree/main/docs docs)| [docs](/viggy28/streambed/tree/main/docs docs)|[internal](/viggy28/streambed/tree/main/internal internal)| [internal](/viggy28/streambed/tree/main/internal internal)|[scripts](/viggy28/streambed/tree/main/scripts scripts)| [scripts](/viggy28/streambed/tree/main/scripts scripts)|[site](/viggy28/streambed/tree/main/site site)| [site](/viggy28/streambed/tree/main/site site)|[test](/viggy28/streambed/tree/main/test test)| [test](/viggy28/streambed/tree/main/test test)|[.gitignore](/viggy28/streambed/blob/main/.gitignore .gitignore)| [.gitignore](/viggy28/streambed/blob/main/.gitignore .gitignore)|[.goreleaser.yml](/viggy28/streambed/blob/main/.goreleaser.yml .goreleaser.yml)| [.goreleaser.yml](/viggy28/streambed/blob/main/.goreleaser.yml .goreleaser.yml)|[CHANGELOG.md](/viggy28/streambed/blob/main/CHANGELOG.md CHANGELOG.md)| [CHANGELOG.md](/viggy28/streambed/blob/main/CHANGELOG.md CHANGELOG.md)|[CLAUDE.md](/viggy28/streambed/blob/main/CLAUDE.md CLAUDE.md)| [CLAUDE.md](/viggy28/streambed/blob/main/CLAUDE.md CLAUDE.md)|[CONTRIBUTING.md](/viggy28/streambed/blob/main/CONTRIBUTING.md CONTRIBUTING.md)| [CONTRIBUTING.md](/viggy28/streambed/blob/main/CONTRIBUTING.md CONTRIBUTING.md)|[LICENSE](/viggy28/streambed/blob/main/LICENSE LICENSE)| [LICENSE](/viggy28/streambed/blob/main/LICENSE LICENSE)|[README.md](/viggy28/streambed/blob/main/README.md README.md)| [README.md](/viggy28/streambed/blob/main/README.md README.md)|[architecture.svg](/viggy28/streambed/blob/main/architecture.svg architecture.svg)| [architecture.svg](/viggy28/streambed/blob/main/architecture.svg architecture.svg)|[docker-compose.yml](/viggy28/streambed/blob/main/docker-compose.yml docker-compose.yml)| [docker-compose.yml](/viggy28/streambed/blob/main/docker-compose.yml docker-compose.yml)|[go.mod](/viggy28/streambed/blob/main/go.mod go.mod)| [go.mod](/viggy28/streambed/blob/main/go.mod go.mod)|[go.sum](/viggy28/streambed/blob/main/go.sum go.sum)| [go.sum](/viggy28/streambed/blob/main/go.sum go.sum)|查看所有文件仓库文件导航- README- 贡献指南- Apache 2.0 许可证Streambed[](https://github.com/viggy28/streambed/actions/workflows/ci.yml)[](https://pkg.go.dev/github.com/viggy28/streambed)[](/viggy28/streambed/blob/main/LICENSE)这是一个从 Postgres 到 Iceberg 的变更数据捕获CDC引擎。无需更改应用程序即可将分析查询从生产数据库中卸载出来。Streambed 通过逻辑复制流式传输 WAL 变更将 Parquet 文件写入 S3并提交 Iceberg 元数据。你可以使用任何与 Iceberg 兼容的引擎查询结果也可以使用内置的查询服务器它支持 Postgres 有线协议因此你可以使用 psql 进行连接。查看实际效果对 pgbench100 万个账户50 万条历史记录执行相同的分析查询。左侧是 Postgres右侧是 Streambed。[](/viggy28/streambed/blob/main/docs/demo.gif)无需 ETL无需 Spark只需 Postgres S3。快速开始# 在本地启动 Postgres MinIOdocker compose up -d# 构建go build -o streambed ./cmd/streambed# 在 :5433 端口启动同步和查询服务器./streambed sync \ --source-urlpostgres://postgres:testlocalhost:5432/postgres \ --s3-bucketstreambed \ --s3-endpointhttp://localhost:9000 \ --s3-prefixtest \ --query-addr:5433# 通过 Iceberg 查询你的 Postgres 表psql -h localhost -p 5433 -U postgres -d postgres运行 streambed sync --help 可查看所有配置选项。所有标志都支持以 STREAMBED_ 为前缀的环境变量例如 STREAMBED_SOURCE_URL。架构[](/viggy28/streambed/blob/main/docs/architecture.svg)工作原理Postgres WAL ──▶ 解码 ──▶ 缓冲 ──▶ Parquet ──▶ S3 ──▶ Iceberg 提交│DuckDB ◀──┘ (查询服务器)Streambed 作为逻辑复制订阅者连接到 Postgres。它解码 WAL 消息插入、更新、删除按表缓冲行并定期将它们作为 Parquet 文件刷新到 S3 并提交 Iceberg 元数据。更新和删除操作会对现有的 Parquet 数据进行写时复制合并。查询服务器使用嵌入式 DuckDB 通过 Postgres 有线协议公开 Iceberg 表因此你可以使用 psql 或任何 Postgres 客户端进行查询。命令| 命令 | 功能 || --- | --- || streambed sync | 主守护进程。流式传输 WAL写入 Iceberg可选择提供查询服务。 || streambed resync --tablepublic.users | 通过 COPY 在一致的快照下进行一次性回填。 || streambed query | 独立查询服务器不进行同步。指向现有的 Iceberg 表。 || streambed cleanup --tablepublic.users | 删除表的 S3 对象和状态。在 resync 之前使用很有用。 |开发需要 Go 1.22 及以上版本和 CGO用于 go-duckdb 和 go-sqlite3。# 构建go build -o streambed ./cmd/streambed# 单元测试go test ./internal/... ./config/...# 集成测试需要 Docker./scripts/test-integration.sh集成测试使用 integration 构建标签并针对 test/integration/docker-compose.yml 中的 Postgres端口 5434和 MinIO端口 9002运行。关于通过逻辑复制将 Postgres 流式传输到 S3 上的 Apache Iceberg并可通过 Postgres 有线协议进行查询。[streambed.dev/](https://streambed.dev/ https://streambed.dev/)主题[ postgres ](/topics/postgres 主题postgres) [ s3 ](/topics/s3 主题s3) [ parquet ](/topics/parquet 主题parquet) [ iceberg ](/topics/iceberg 主题iceberg) [ duckdb ](/topics/duckdb 主题duckdb)资源- Readme许可证Apache 2.0 许可证贡献贡献指南哎呀加载时出现错误。[请重新加载此页面]()[ 活动](/viggy28/streambed/activity)收藏[93个收藏](/viggy28/streambed/stargazers)关注者[0个关注者](/viggy28/streambed/watchers)分支[4个分支](/viggy28/streambed/forks)[ 举报仓库 ](/contact/report-content?content_urlhttps%3A%2F%2Fgithub.com%2Fviggy28%2Fstreambedreportviggy28%28用户%29)[发布版本](/viggy28/streambed/releases)未发布任何版本[包 0](/users/viggy28/packages?repo_namestreambed)哎呀加载时出现错误。[请重新加载此页面]()[贡献者](/viggy28/streambed/graphs/contributors)- - -哎呀加载时出现错误。[请重新加载此页面]()语言- [ Go 99.9% ](/viggy28/streambed/search?lgo)- 其他 0.1%页脚[ ](https://github.com) © 2026 GitHub, Inc.页脚导航- [条款](https://docs.github.com/site-policy/github-terms/github-terms-of-service)- [隐私](https://docs.github.com/site-policy/privacy-policies/github-privacy-statement)- [安全](https://github.com/security)- [状态](https://www.githubstatus.com/)- [社区](https://github.community/)- [文档](https://docs.github.com/)- [联系我们](https://support.github.com?tagsdotcom-footer)- 管理 Cookie- 不共享我的个人信息此时你无法执行该操作。