Re: Dividing progress/debug information in pg_standby, and stat before copy

Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>

From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Josh Berkus <josh@agliodbs.com>
Cc: Magnus Hagander <magnus@hagander.net>, Tom Lane <tgl@sss.pgh.pa.us>, Greg Smith <greg@2ndquadrant.com>, Selena Deckelmann <selenamarie@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Simon Riggs <simon@2ndQuadrant.com>
Date: 2010-01-26T18:48:52Z
Lists: pgsql-hackers
Josh Berkus wrote:
>> *That* makes pg_standby obsolete, not streaming replication per se.
>> Setting standby_mode=on, with a valid restore_command using e.g 'cp' and
>> no connection info for walreceiver is more or less the same as using
>> pg_standby.
> 
> What about deletion of no-longer-needed WALfile copies?

Yeah, good point. You can still use a shell script as restore_command,
pass the %r option to it, and do the deletion there.

I didn't intend to replace pg_standby when I started this, it just kind
of happened. Maybe we should provide a sample script similar to
pg_standby, to be used instead of plain 'cp', that does the cleanup too.

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com