What is the best way to see whats going on with a PHP connection to a PostgreSQL database from the log?
I've edited my "postgresql.conf" file to include debugging level 5 information (debug5) (maybe not needed??):
client_min_messages = debug5
log_min_messages = debug5
log_min_error_statement = debug5
however, the ./pg_log/postgresql-*.log file doesn't seem to include any helpful command or failed login information from PHP??
./pg_log/postgresql-*.log:
DEBUG: pg_toast_2619: vac: 0 (threshold 52), anl: 0 (threshold 51)
DEBUG: CommitTransaction
DEBUG: name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/0, nestlvl: 1, children:
DEBUG: shmem_exit(0): 8 callbacks to make
DEBUG: proc_exit(0): 2 callbacks to make
DEBUG: exit(0)
DEBUG: shmem_exit(-1): 0 callbacks to make
DEBUG: proc_exit(-1): 0 callbacks to make
DEBUG: reaping dead processes
DEBUG: server process (PID 20524) exited with exit code 0
PHP:
<?php
// Connecting, selecting database
$dbconn = pg_connect("host=localhost dbname=orion user=USERNAME password=PASSWORD")
or die('Could not connect: ' . pg_last_error());
// Performing SQL query
$query = 'SELECT * FROM main';
$result = pg_query($query) or die('Query failed: ' . pg_last_error());
// Printing results in HTML
echo "<table>
";
while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {
echo "\t<tr>
";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>
";
}
echo "\t</tr>
";
}
echo "</table>
";
// Free resultset
pg_free_result($result);
// Closing connection
pg_close($dbconn);
?>
Is there anyway to see whats going on with the PHP connection to PostgreSQL in detail? The other log files in ./pg_clog/ look like "0000" and are binary? I'm using the default values for everything else in the postgresql.conf file.