Re: pg_xlog and standby

From: "Roberto Scattini" <roberto(dot)scattini(at)gmail(dot)com>
To: "Erik Jones" <erik(at)myemma(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_xlog and standby
Date: 2008-01-23 20:18:42
Message-ID: d70926850801231218y7954933by69890cf4ddb98351@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Jan 23, 2008 2:28 PM, Erik Jones <erik(at)myemma(dot)com> wrote:
>
> You don't. The main server should not be keeping archived WAL files
> directly in pg_xlog/. As it queues WAL files to be archived it puts
> them in pg_xlog/archive_status/ with file names suffixed with .ready,
> once they are archived that suffix changes to .done after which, at
> some point (I'm not sure how long/many) they are removed.
>

mmmmmmmm, ok. the problem that im having is that i have A LOT of
archive files on pg_xlog dir, and thats because the archive_command
keeps failing (the standby server had filled his disk with archives
received but not proccesed), so now, i dont know how i can remove
those files and start again...

> Now, if you took your standby server offline, but didn't disable your
> archive_command then you've basically been accumulating WALs with
> the .ready prefix in the archive_status directory that, if you're
> going to start from scratch with your standby, you can safely
> delete. Just make sure you have a couple of WAL files successfully
> archived (suffix has changed to .done in the archive_status dir and
> you've verified that they've reached whatever directory your standby
> expects them to be in) before call pg_start_backup() and starting
> your new base backup.
>
> IMO, the most important point to be had here is DO NOT delete WALs
> that sit directly under pg_xlog/. Mistakes with the rest can be
> worked with, you could run into serious problems with your primary
> when deleting WALs directly under pg_xlog/.
>

yeah, i agree. but now i have aprox 40GB of archive files in pg_xlog
dir in the production server. :S

> Also, do you know why your standby stopped recovering? I'd say you
> should make sure you know why and how, otherwise you run the risk of
> the same thing happening again.

i dont know exactly, but it is very possible that it could be an
unfinished server re-config.

>
> Erik Jones

thanks for your help!

--
Roberto Scattini
___ _
))_) __ )L __
((__)(('(( ((_)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Hart 2008-01-23 20:19:47 Re: Best practices for protect applications agains Sql injection.
Previous Message Charles Simard 2008-01-23 20:08:09 Re: Count