php - 如何在 PostgreSQL 9.1 中使用 pgFouine?

标签 php postgresql profiling pgfouine

使用 pgFouine 1.2,PostgreSQL 9.1.3。

postgresql.conf 设置:

log_min_duration_statement = 0
log_duration = on
log_line_prefix = '%t [%p]: [%l-1] '
log_statement = 'all'
lc_messages = 'C'           # locale for system error message strings
lc_monetary = 'C'           # locale for monetary formatting
lc_numeric = 'C'            # locale for number formatting
lc_time = 'C'               # locale for time formatting

运行 pgFouine 时出现错误:

C:\Users\Razvan\Desktop\pgfouine-1.2>php pgfouine.php -file log > report.html

pgFouine did not find any valid PostgreSQL log line in your log file:
* check that PostgreSQL uses an english locale for logging (lc_messages in your postgresql.conf),
* check that you use the -logtype option (syslog, stderr) according to your log file,
* if you use syslog and log_line_prefix, check that your log_line_prefix has a trailing space,
* if you use stderr, check that your log_line_prefix is of the form '%t [%p]: [%l-1] '.
If you think your log file and your options are correct, please contact the author (gsmet on #postgresql@freenode or guillaume-pg at smet dot org).

我正在使用在 C:\Program Files\PostgreSQL\9.1\data\pg_log 中找到的日志文件

我尝试了各种设置,但没有任何效果,也无法在互联网上找到任何解决方案。

感谢您的帮助!

最佳答案

尝试添加日志类型选项:

pgfouine -logtype stderr -file filename

关于php - 如何在 PostgreSQL 9.1 中使用 pgFouine?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10651890/

相关文章:

php - 将数据信息存储在 SESSION 中而不是使用 MySQL 查询?

php - 如何使用 CURRENT_TIMESTAMP 添加截止日期?

sql - PostgreSQL:如何列出所有可用的数据类型?

postgresql - 为每个 ID 选择最大值(包括一个 ID 有多个最大值的可能性!)

reactjs - react 分析器 : What do the timings mean?

c# - Mono 分析器以意想不到的方式更改程序的执行

assembly - 探查器如何对正在运行的程序进行采样?

php - 如何忽略 SQL SELECT 查询中的空约束

php - 使用\PHPUnit_Framework_TestCase 或 ..\TestCase

postgresql - 如何使用 PostgreSQL 加密密码?