postgresql 复制 +擦洗
是否有任何简单的(内置、附加、开源或商业)可以在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许您应该尝试创建要清理的表的视图(在 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.
我相信从属设备上的触发器会让您面临不合规的风险,因为数据可能会泄漏。如果您想要一个打包的解决方案,我可能会看看 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.
是的。使用 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).