From: Simon Riggs <simon@2ndQuadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Simplifying replication
Date: Wed, 27 Oct 2010 08:53:31 +0100
Message-ID: <1288166011.1587.1199.camel@ebony> (raw)
In-Reply-To: <AANLkTi=Z_KfAW6eTbmEB63XCY0bp8iuRaVmwPPEgRksq@mail.gmail.com>
References: <201010220022.o9M0M8Q29438@momjian.us>
<4CC0DEDE.7060707@agliodbs.com>
<AANLkTin0RfGOvk20vLYYfCDzdf5Sf94aQ5V-xOBB+Kqx@mail.gmail.com>
<AANLkTik-L-68UpwgyBh5HtROzkEYQ297fiy7C-c6qRfX@mail.gmail.com>
<1288096049.1587.253.camel@ebony>
<AANLkTi=Usaoa6aZ7jSuunFLpPssKZqcRb-f_6FJ6Xz4C@mail.gmail.com>
<4CC78781.4000206@agliodbs.com>
<AANLkTi=Z_KfAW6eTbmEB63XCY0bp8iuRaVmwPPEgRksq@mail.gmail.com>
On Tue, 2010-10-26 at 22:03 -0400, Robert Haas wrote:
> On Tue, Oct 26, 2010 at 9:59 PM, Josh Berkus <josh@agliodbs.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: simon@2ndQuadrant.com, robertmhaas@gmail.com, josh@agliodbs.com, gsstark@mit.edu, bruce@momjian.us
Subject: Re: Simplifying replication
In-Reply-To: <1288166011.1587.1199.camel@ebony>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox