0

I have Postgres configuration with LOGFILE defined in the bash script /etc/rc.d/init.d/postgresql by the option -l ${LOGFILE}

Log gives the following output :

2013-06-07 11:28:18 EDT rentgrowLOG: statement: select count(*) from (select * from results limit 1) test
2013-06-07 11:28:18 EDT rentgrowLOG: duration: 0.333 ms

This output is not readable by pgfouine.php – the error is: “pgFouine did not find any valid PostgreSQL log line in your log file:”

I found also that my changes in postgresql.conf do not affect the output at all.

How prepare a Postgres log file readable by pgfouine.php?

2
  • 2
    What's your log_line_prefix in postgresql.conf and what are the options passed to pgFouine? Commented Jun 7, 2013 at 22:09
  • log_line_prefix = '%t [%p]: [%l-1] ' C:\pgf>\wamp\bin\php\php5.3.13\php.exe pgfouine.php -file postgresql-2013-06-07_182652.log -logtype stderr I do not see that changing the options in the config files changes the output. I could not install php on Linux, so I am using windows Commented Jun 11, 2013 at 14:39

1 Answer 1

1

I found also that my changes in postgresql.conf do not affect the output at all.

That's probably the source of the problem. Your log_line_prefix is being ignored. Otherwise, with the prefix set to '%t [%p]: [%l-1] ' as recommended by pgFouine, the log entries would look like this:

2013-06-13 16:38:18 CEST [6203]: [2-1] LOG:  duration: 0.169 ms  statement: select 1;

As to the question: why are the changes to postgresql.conf being ignored? Some typical reasons would be:

  1. Not reloading it after the change, by sending SIGHUP to the postmaster, either directly or through the pg_ctl or service commands.
  2. Editing the wrong file. See: Where are my postgres *.conf files?
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.