Re: timestams in the the pg_standby output

From: Tim Uckun <timuckun(at)gmail(dot)com>
To: Greg Smith <greg(at)2ndquadrant(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:22:48
Message-ID: 855e4dcf1001042322w3cbca5fbnfead54b0ac0f480f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>     printf "%s %s\n", strftime("%Y-%m-%d %H:%M:%S", localtime(time)), $item
>
> (untested, and I am not a regular Perl programmer, its but File::Tail is the
> best library I know of to do this sort of thing)
>

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yan Cheng Cheok 2010-01-05 07:30:07 Re: PostgreSQL Write Performance
Previous Message Greg Smith 2010-01-05 06:13:44 Re: timestams in the the pg_standby output