1

I am using PostgreSQL 9.2.2 (Windows) with phpPgAdmin 5.1.

I need to monitor who connects to the server, and with which application.

In the logging parameters of postgresql.conf, I use the following log line prefix:

log_line_prefix = '%t\t%a\t%d\t%h\t%u\t'

where %a specifies the application connected to the database.

Once a user is connected to the server using psql and executes a command, it shows in the log as follows:

2016-03-14 14:55:11 EDT psql    phenotree_development   000.000.000.00  cleseb  LOG:  duration: 32.000 ms  statement: select * from organisms limit 10;

However, when PhpPgAdmin is used, the application name never shows, for example:

2016-03-17 09:30:30 EDT [unknown]   phenotree_development   ::1 cleseb  LOG:  duration: 0.000 ms  statement: SELECT * FROM (select * from organisms) AS sub  LIMIT 30 OFFSET 0

How to have the application name appear in the log for PhpPgAdmin?

Sébastien Clément
  • 1,825
  • 3
  • 19
  • 28

0 Answers0