[英]Postgres database search all tables
Good Afternoon everyone, I've got a knotty problem, I have a mature Postgres database that has over 500 tables, and is too large to dump. 大家下午好,我遇到了一个棘手的问题,我有一个成熟的Postgres数据库,该数据库有500多个表,并且太大而无法转储。 When a product is added to the database a new line is created in many tables and I'd like to check what information is added in order to replicate the functionality in a new piece of software. 将产品添加到数据库后,会在许多表中创建新行,我想检查添加了哪些信息,以便在新软件中复制功能。 The reason is the existing software interface is very old and unfriendly so we are replacing it. 原因是现有的软件界面非常旧且不友好,因此我们将其替换。 I can't very easily use the approach suggested here: Search entire postgres database? 我不太容易使用这里建议的方法: 搜索整个postgres数据库? . 。 Can anyone suggest another solution? 谁能建议其他解决方案?
I should clarify i can't modify the database at all, until we have reliably replaced the existing interface and that won't be for months yet. 我要澄清的是,在我们可靠地替换了现有接口之前,根本无法修改数据库,而且这种情况将持续数月之久。
Thanks 谢谢
You can set log_statement = 'all'
for the short time when you run your experiment. 您可以在运行实验时将log_statement = 'all'
为很短的时间。 Make sure that your log_line_prefix
contains %c
. 确保您的log_line_prefix
包含%c
。 Then you can track all SQL statements that belong to one database session. 然后,您可以跟踪属于一个数据库会话的所有SQL语句。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.