If I invoke postgres with -d5 every interaction gets dumped to the screen.
example:
postgres@database:~$ psql template1
Welcome to psql 7.4.7, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=#
gets me this output:
2008-09-05 01:34:44 [4421] DEBUG: ProcessQuery
2008-09-05 01:34:44 [4421] DEBUG: CommitTransactionCommand
2008-09-05 01:34:44 [4421] DEBUG: proc_exit(0)
2008-09-05 01:34:44 [4421] DEBUG: shmem_exit(0)
2008-09-05 01:34:44 [4421] DEBUG: exit(0)
2008-09-05 01:34:44 [4364] DEBUG: reaping dead processes
2008-09-05 01:34:44 [4364] DEBUG: child process (PID 4421) exited with exit code 0
2008-09-05 01:34:44 [4429] LOG: connection received: host=[local] port=
2008-09-05 01:34:44 [4364] DEBUG: forked new backend, pid=4429 socket=9
2008-09-05 01:34:44 [4429] LOG: connection authorized: user=postgres database=template1
2008-09-05 01:34:44 [4429] DEBUG: /usr/lib/postgresql/bin/postmaster child[4429]: starting with (
2008-09-05 01:34:44 [4429] DEBUG: postgres
2008-09-05 01:34:44 [4429] DEBUG: -d5
2008-09-05 01:34:44 [4429] DEBUG: -v196608
2008-09-05 01:34:44 [4429] DEBUG: -p
2008-09-05 01:34:44 [4429] DEBUG: template1
2008-09-05 01:34:44 [4429] DEBUG: )
2008-09-05 01:34:44 [4429] DEBUG: InitPostgres
How do I get that behavior on 8.2.x/8.3.x ?