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 22:14:37
Message-ID: 855e4dcf1001051414m37b9d1e7h94179fc890fff96e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Uckun 2010-01-05 22:21:08 Re: PostgreSQL Write Performance
Previous Message Milan Zamazal 2010-01-05 20:05:48 Re: Large tables, ORDER BY and sequence/index scans