postgresql 复制 +擦洗

发布于 2024-09-10 06:01:53 字数 163 浏览 1 评论 0原文

是否有任何简单的(内置、附加、开源或商业)可以在 Postgresql(主从)上进行复制,以便在复制时清理从属内部的数据以符合 PCI 合规性? ETL工具怎么样?它不一定是瞬时的……最多一个小时的延迟是可以接受的,但当然越快越好。

如果这不起作用,那么如何在从数据库上使用触发器来实现这一目标?

Is there any an easy (built-in, add-on, open-source or commercial) to do replication on Postgresql (Master-slave) to have the data inside the slave be scrubbed for PCI compliance while being replicated across? How about ETL tools? It does not have to be instantaneous ... up to an hour lag is acceptable but the faster the better of course.

If this doesn't work, how about possibly using triggers on the slave database to achieve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

疯了 2024-09-17 06:01:53

也许您应该尝试创建要清理的表的视图(在 SELECT 中执行清理),然后将该视图复制到异地位置。

Perhaps you should try creating a view of the tables you wish to scrub (performing your scrubbing in the SELECT), and then replicate the view to your offsite location.

诗笺 2024-09-17 06:01:53

我相信从属设备上的触发器会让您面临不合规的风险,因为数据可能会泄漏。如果您想要一个打包的解决方案,我可能会看看 Bucardo,专门研究将自定义复制挂钩到从属服务器中,以过滤掉(或修改)您不需要/不需要的列。如果这不起作用,那么使用视图的想法可能是您的下一个最佳选择。

I believe triggers on the slave would put you at risk for non-compliance, since data could leak out. If you want a packaged solution, I'd probably look at Bucardo, looking specifically into doing custom replication hooks into slave, to filter out (or modify) the columns you don't need/want. If that won't work, the idea to use views is probably your next best bet.

肩上的翅膀 2024-09-17 06:01:53

是的。使用 slony,向 master 添加触发器来具体化您想要复制的内容,并且仅复制那些具体化视图。如果你在主人身上擦洗,那应该会达到你想要的效果。由于 Slony 很乐意只复制数据库的一部分,所以应该可以正常工作(另一方面,请记住,Slony 很乐意只复制数据库的一部分)。

Yes. Use slony, add triggers to the master to materialize what you want to replicate and replicate only those materialized views. If you scrub on the master, that should do what you want. Since Slony will happily replicate only part of your database, that should work fine (on the other hand, remember, Slony will happily replicate only part of your database).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文