Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database Postgresql中特定于日志的数据库查询_Database_Postgresql_Logging_Grep - Fatal编程技术网

Database Postgresql中特定于日志的数据库查询

Database Postgresql中特定于日志的数据库查询,database,postgresql,logging,grep,Database,Postgresql,Logging,Grep,是否可以在postgresql中只记录在特定数据库上执行的查询 一种可能的解决方案是记录数据库名称,最后对其进行grep。如果有更好的方法会很有帮助,因为生成的日志非常庞大,grep不是很方便。contrib模块pg_stat_语句可以做到这一点: 因为它只跟踪安装模块的数据库的语句。对此有何见解

是否可以在postgresql中只记录在特定数据库上执行的查询


一种可能的解决方案是记录数据库名称,最后对其进行grep。如果有更好的方法会很有帮助,因为生成的日志非常庞大,grep不是很方便。

contrib模块pg_stat_语句可以做到这一点:

因为它只跟踪安装模块的数据库的语句。

对此有何见解