Open the postgresql.conf config file:
$> mate /usr/local/var/postgres/postgresql.conf
Uncomment the line with 'log_destination' and set it to 'syslog'
log_destination = 'syslog'
Open the syslog config:
#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Open the postgresql.conf config file:
$> mate /usr/local/var/postgres/postgresql.conf
Uncomment the line with 'log_destination' and set it to 'syslog'
log_destination = 'syslog'
Open the syslog config: