Re: macro %r de pg_standby

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: William <wilk(at)flibuste(dot)net>
Cc: pgsql-fr-generale(at)postgresql(dot)org
Subject: Re: macro %r de pg_standby
Date: 2011-11-08 21:30:03
Message-ID: 1320787803.2193.46.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-fr-generale

Bonjour,

On Tue, 2011-11-08 at 10:50 +0000, William wrote:
> [...]
> Dans la doc, je n'arrive pas à comprendre exactement comment compte la
> macro %r
> If restartwalfile is specified, normally by using the %r macro, then
> all WAL files logically preceding this file will be removed from
> archivelocation. This minimizes the number of files that need to be
> retained, while preserving crash-restart capability. Use of this
> parameter is appropriate if the archivelocation is a transient
> staging area for this particular standby server, but not when the
> archivelocation is intended as a long-term WAL archive area.
>

%r est remplacé par le nom du journal de transactions qui n'est plus
utile en cas de crash et redémarrage de l'esclave. Autrement dit, en le
fournissant à un outil comme pg_standby ou pg_archivecleanup, il est
possible de supprimer les journaux de transactions archivés sur
l'esclave qui ne sont plus utiles.

> La procédure habituelle pour faire du log_shipping est
> - activer l'archivage
> - faire un backup
> - transférer ce backup sur le slave
> - utiliser un recovery.conf sur le slave pour récupérer les logs
>
> Si je met %r est-ce qu'il va conserver tous les logs depuis ce backup ?
> (et donc me permettre de faire du pitr entre le backup et maintenant ?)
>

Si vous mettez %r où ?

À partir du recovery.conf, vous pouvez l'indiquer pour pg_standby avec
le paramètre restore_command ou pour pg_archivecleanup avec le paramètre
archive_cleanup_command.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgsql-fr-generale by date

  From Date Subject
Next Message William 2011-11-09 09:36:49 Re: macro %r de pg_standby
Previous Message William 2011-11-08 10:50:46 macro %r de pg_standby