Re: Simplifying replication

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, Greg Stark <gsstark(at)mit(dot)edu>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Simplifying replication
Date: 2010-10-27 07:53:31
Message-ID: 1288166011.1587.1199.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2010-10-26 at 22:03 -0400, Robert Haas wrote:
> On Tue, Oct 26, 2010 at 9:59 PM, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> >
> >> If you set wal_keep_segments=0, archive_mode=on, and
> >> archive_command=<something>, you might run out of disk space.
> >>
> >> If you set wal_keep_segments=-1, you might run out of disk space.
> >>
> >> Are you any more screwed in the second case than you are in the first
> >> case?
> >
> > It is the same to the user either way. In either case you have to
> > change some settings and restart the master.
>
> Except that changing wal_keep_segments doesn't require restarting the master.
>
> The point of allowing -1 was to allow someone to set it to that value
> temporarily, to be able to do a hot backup without having to guess how
> large to set it. If you don't have enough disk space for a backup to
> complete, you're kind of hosed either way.

You're not hosed either way. Fujii designed this carefully to avoid that
and it works. The case of archive_command failing isn't comparable
because that is a failure case, not a normal working server.

You don't need to guess the setting of wal_keep_segments. It's a safety
net that has been deliberately created to avoid the crash that would
otherwise happen. I've not heard a better proposal, yet, though I too am
hopeful there is a better one.

This is all described in my new book on PostgreSQL Administration,
available from the link below. I'm told that everything you need is also
in the docs.

--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2010-10-27 07:56:00 Re: add label to enum syntax
Previous Message Divakar Singh 2010-10-27 03:10:56 Re: Postgres insert performance and storage requirement compared to Oracle