TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Pgstream – CDC tool for PostgreSQL with DDL support

8 点作者 tudorg10 个月前
Hi HN,<p>pgstream is an open source CLI tool and Go library for Postgres logical replication events. We have some bigger plans with it, but as of now its main &quot;differentiator&quot; is that it includes not only data changes but also DDL changes in the same ordered and consistent stream.<p>We have developed this because in the Xata platform we handle automatic replication from Postgres to Elasticsearch&#x2F;OpenSearch. Initially schema changes were problematic because they required us intercepting them at the API layer and then apply them to the search engine. But if the replication is slightly delayed or faster than the update, you can get replication errors. Having a single consistent stream with both makes consumer a lot more reliable in the face of schema changes.<p>The way it works is that pgstream installs event triggers for DDL changes and maintains a &quot;shadow&quot; representation of the schema in a separate table. The changes to this table are included in the replication stream.<p>Besides the Elasticsearch&#x2F;OpenSearch output, pgstream also comes with a simple &quot;webhook&quot; output which is a simple way to get webhooks for any changes that happen in Postgres (data &amp; schema).<p>GitHub repo: <a href="https:&#x2F;&#x2F;github.com&#x2F;xataio&#x2F;pgstream">https:&#x2F;&#x2F;github.com&#x2F;xataio&#x2F;pgstream</a>

暂无评论

暂无评论