Defaults for replication/backup

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Defaults for replication/backup
Date: 2016-02-13 13:15:22
Message-ID: CABUevEwfV7zDutescm2PHGvsJdYA0RWHFMTRGhwrJPGgSbzZDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I know we've had many discussions about the defaults, so hey, let's bring
out the paint-cans and do the bikeshed all over again.

I would suggest a couple of changes to the default values in parameters
related to backup and replication.

The reason for this is to make it "easier to do the right thing by
default", meaning the defaults should be more suitable for new users to use
our tools in the default config.

Yes, these changes will increase some of the default overhead. My argument
against that is that anybody who actually cares about that overhead is
going to be tuning their database *anyway*, so they can just change things
back to the old defaults.

So, I suggest the following changes to the defaults:

wal_level=hot_standby
max_wal_senders=10
max_replication_slots=10

And in pg_hba.conf, we enable the replication connections by default for
the superuser on local/localhost.

This will make it possible to actually take a proper backup (not just a
dump) off a default config cluster without having to do a restart first.
And it allows you to set up archiving with pg_receivexlog for full PITR.

I think the overhead of the two max parameters is really small, but they're
both dependent on the default wal_level. Yes, we've discussed it before. I
think it's time to make the change now.

I'm sure there are many more settings we could discuss the defaults for,
but this particular biikeshed is mine so I get to decide the initial
borders, even if I don't get to decide the colors :P

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-02-13 13:23:27 Re: extend pgbench expressions with functions
Previous Message Michael Paquier 2016-02-13 13:04:49 Re: Small PATCH: check of 2 Perl modules