Re: timestams in the the pg_standby output - Mailing list pgsql-general

From Greg Smith
Subject Re: timestams in the the pg_standby output
Date
Msg-id 4B42EC51.7040604@2ndquadrant.com
Whole thread Raw
In response to Re: timestams in the the pg_standby output  (Tim Uckun <timuckun@gmail.com>)
Responses Re: timestams in the the pg_standby output  (Tim Uckun <timuckun@gmail.com>)
List 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@2ndQuadrant.com  www.2ndQuadrant.com


pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: PostgreSQL Write Performance
Next
From: Milan Zamazal
Date:
Subject: Large tables, ORDER BY and sequence/index scans