请问HN:有没有好的工具可以对多租户数据库进行pgdump?
我刚加入了一家公司,他们在Postgres中运行一个多租户数据库,每个租户通过其账户ID来区分。我希望能够将单个账户的数据导出到我的本地实例,以便于调试。
问题是,许多实体并不包含账户ID。例如,用户可以有一个账户ID,但用户的帖子没有账户ID,而是与用户ID相关联。此外,外键并没有完全实现。
有没有什么工具或技术可以帮助简化这个过程?
查看原文
Just joined a new company and they run a multi tenant database in postgres where each tenant is distinguished by their account ID.
I'd like to be able to dump the data of a single account to my local instance to assist in debugging.<p>Problem is, many of the entities do not include an account ID.
For example, a user can have an account ID but a user post will not but it will be tied to a user ID.<p>Also foreign keys aren't really implemented fully.<p>Are there any tools or techniques that could help make this process easier to do?