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

From Tim Uckun
Subject Re: timestams in the the pg_standby output
Date
Msg-id 855e4dcf1001051414m37b9d1e7h94179fc890fff96e@mail.gmail.com
Whole thread Raw
In response to Re: timestams in the the pg_standby output  (Greg Smith <greg@2ndquadrant.com>)
Responses Re: timestams in the the pg_standby output  (Greg Smith <greg@2ndquadrant.com>)
List pgsql-general
>
> 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.

Actually I could not get it to send the output to the pipe at all. I
tried several things like writing to log file from the script or send
the output of the script to STDOUT and redirecting from there but no
matter what I did if I sent the output of the pg_standby to the pipe
the script received nothing and all the output went to postgres log
file.

The last thing I tried looked like this.

restore_command = '/usr/lib/postgresql/8.3/bin/pg_standby -l -d -s 30
-t /var/lib/postgresql/pgsql.trigger /var/lib/postgresql/archive %f %p
%r 2 | /var/lib/postgresql/prepend_timestamp.sh >>
/var/lib/postgresql/standby.log'

As I said I tried several things like not redirecting to a file,
redirecting in the script etc.

I guess the next thing to try is to tail the log file and create a new
log file with the timestamps.

pgsql-general by date:

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