Re: increasing the default WAL segment size - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: increasing the default WAL segment size
Date
Msg-id CABUevEyS9T+01zHYZq-JW-2TGggkpjrtVvXPN4QAaQvs815+YA@mail.gmail.com
Whole thread Raw
In response to Re: increasing the default WAL segment size  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: increasing the default WAL segment size  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers


On Thu, Aug 25, 2016 at 5:32 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Aug 24, 2016 at 10:33 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... but I think this is just folly.  You'd have to do major amounts
>> of work to keep, eg, slave servers on the same page as the master
>> about what the segment size is.

> I said an initdb-time parameter, meaning not capable of being changed
> within the lifetime of the cluster.  So I don't see how the slave
> servers would get out of sync?

The point is that that now becomes something to worry about.  I do not
think I have to exhibit a live bug within five minutes' thought before
saying that it's a risk area.  It's something that we simply have not
worried about before, and IME that generally means there's some squishy
things there.

If we ignore the possible performance implications (which we shouldn't, of course, but for the sake of argument), I think having it as a configurable parameter in initdb would make it *less* of something to worry about.

Because it comes with the cluster during replication. I think it's more likely that you accidentally end up with two instances compiled with different values than that you get an issue from this.

That said, I think it also has to be a *very* bad painpoint for somebody to care about changing it if it requires recompilation. The vast majority of users run the packaged versions, and they don't want to run anything else. So you will have whatever the RPMs or the DEBs or installers pick for you. Anything that is a ./configure-time option,is something we should expect almost nobody to change.

Changing the default will of course help/hurt those as well. But if we change the default to something high and say "hey those of you who just run it on a smaller system should recompile with a different --configure", we are being *very* user-unfriendly. Or the other way around.

That doesn't mean we shouldn't change the default. We just need to be a lot more careful about what we change it to if it's ./configure to reset it.
 
--

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: increasing the default WAL segment size
Next
From: Stephen Frost
Date:
Subject: Re: increasing the default WAL segment size