Re: timestams in the the pg_standby output

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Tim Uckun <timuckun(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: timestams in the the pg_standby output
Date: 2010-01-05 07:37:53
Message-ID: 4B42EC51.7040604@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tim Uckun wrote:
> Ah if I am going to do that I suppose something like this would work.
>
> #!/bin/sh
> while read data; do
> echo "`date +%H:%M:%S` : $data" >> logfile.log
> done
>

If that works, great. I'm not sure if you'll run afoul of output
buffering in this situation. Clearly you've got the right idea, just
need to make sure it behaves as you expect and doesn't clump the line
reads into larger chunks.

The main improvement in the Perl implementation over this is the ability
to do things like adjust timeout behavior easily.

--
Greg Smith 2ndQuadrant Baltimore, MD
PostgreSQL Training, Services and Support
greg(at)2ndQuadrant(dot)com www.2ndQuadrant.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Milan Zamazal 2010-01-05 09:19:26 Large tables, ORDER BY and sequence/index scans
Previous Message Dann Corbit 2010-01-05 07:34:09 Re: PostgreSQL Write Performance