Search Postgresql Archives

Re: timestams in the the pg_standby output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx  www.2ndQuadrant.com


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux