Re: Streaming Replication and archiving - Mailing list pgsql-hackers

From Mark Kirkwood
Subject Re: Streaming Replication and archiving
Date
Msg-id 4B57A1D8.1000900@catalyst.net.nz
Whole thread Raw
In response to Re: Streaming Replication and archiving  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Streaming Replication and archiving  (Mark Kirkwood <mark.kirkwood@catalyst.net.nz>)
List pgsql-hackers
Tom Lane wrote:
> Mark Kirkwood <mark.kirkwood@catalyst.net.nz> writes:
>   
>> Josh Berkus wrote:
>>     
>>> Sure, but if the archived WAL segments are NOT needed, how are they
>>> supposed to get deleted?  It doesn't take long to run out of disk space
>>> if they're not being rotated.
>>>       
>
>   
>>  From what I am seeing at the moment (8.5 devel from 2 days ago), the 
>> archived segments are not deleted at all (I have several hundred now 
>> after a number of pgbench runs over the last day or so).
>>     
>
> Huh?  *Archived* segments aren't supposed to get deleted, at least not
> by any automatic Postgres action.  It would be up to the DBA how long
> he wants to keep them around.
>
>     
>   

Exactly - there was a comment in the 'retry from archive' thread that 
suggested otherwise. The likely typical use case for streaming 
replication makes a good case and automated safe way of pruning these 
guys - I've seen a few cases where overly aggressive cleanup has broken 
log shipping setups  (usually 8.2, before the restart option was available).

regards

Mark



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Streaming replication, retrying from archive
Next
From: Mark Kirkwood
Date:
Subject: Re: Streaming Replication and archiving