Marco Colombo wrote:
> Mmm, sorry I'm not sure I'm following here. Maybe I should provide some
> background. In my pg_xlog directory I see five files, WAL segments, I
> suppose. Only one (as I expected) is begin currently used, the others
> are old (one a couple of days old).
>
> When PG performs a switch from one segment to another one (I assume it
> recycles the oldest available), does it archive the recycled one (before
> starting using it of course) or the just-filled one? If it's the one
> being recycled, it means that in my setup it would takes two days to
> archive a segment since it stopped being used. Am I missing something?
It calls archive_command on the just-filled one.
>> 1) 2) and 3) are OK, but you need to use archive_command to collect the
>> xlog segments.
>>
>> Actually ... given your low requirements, I wonder why you don't just
>> stop the postmaster, tar the datadir, start the postmaster.
>
> Well, currently we do a pg_dump. The database mainly supports dynamic
> websites. It's very unlikely they get updated at the time the backup
> runs,
You do know that pg_dump gives you a guaranteed accurate snapshot of the
database? It doesn't matter if it's in use.
--
Richard Huxton
Archonet Ltd