Quantcast
Channel: Planet PostgreSQL
Viewing all articles
Browse latest Browse all 9661

Selena Deckelmann: Using logger with pg_standby

$
0
0

Piping logs to syslog is pretty useful for automating log rotation and forwarding lots of different logs to a central log server.

To that end, the command-line utility ‘logger’ is nice for piping output from utilities like pg_standby without having to add syslogging code to the utility itself. Another thing is that logger comes by default with modern packages of syslog.

Here’s an easy way to implement this:


restore_command = 'pg_standby -d -s 2 -t /pgdata/trigger /shared/wal_archive/ %f %p %r 2&>1 | logger -p local3.info -t pgstandby'

Related posts:

  1. Customizing the RPMs from pgrpms.org
  2. Snow Leopard and PostgreSQL: installation help links
  3. Greg’s THREE talks at PostgreSQL Conference East

Viewing all articles
Browse latest Browse all 9661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>