Re: [HACKERS] Replication/backup defaults

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: [HACKERS] Replication/backup defaults
Дата
Msg-id CABUevEwXRHSVwTb-F8-fsvuvc_Ebpm8v0nudo58eZOVafPfhvg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Replication/backup defaults  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: [HACKERS] Replication/backup defaults  (Simon Riggs <simon@2ndquadrant.com>)
Re: [HACKERS] Replication/backup defaults  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers


On Mon, Jan 2, 2017 at 10:32 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
On 2 January 2017 at 09:21, Magnus Hagander <magnus@hagander.net> wrote:
>
>
> On Mon, Jan 2, 2017 at 10:17 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>
>> On 31 December 2016 at 15:00, Magnus Hagander <magnus@hagander.net> wrote:
>> > Cycling back to this topic again, but this time at the beginning of a
>> > CF.
>> >
>> > Here's an actual patch to change:
>> >
>> >
>> > max_wal_senders=10
>> > max_replication_slots=20
>>
>> +1
>>
>> If that doesn't fly, it seems easy enough to introduce a
>> "min_reserve_limit" GUC that defaults to 10 that gives a lower bound
>> on the amount of memory we reserve for many of those shmem allocs;
>> that can be set to 0 for people that want the old behaviour. Then we
>> can allow changes up to the memory limit without a restart.
>>
>> > wal_level=replica
>>
>> This is more problematic because it changes behaviours.
>
>
> You can't actually change the other two without changing wal_level.

You could, but we currently disallow it.

I always assumed we disallowed it because we would have to write actual code to make it safe.

 
>> A more useful approach would be to bring all the things needed to
>> enable replication into one ALTER SYSTEM command, so people have just
>> one thing they need to execute and it will work out the details and
>> locations for you.
>> That way we can maintain the defaults yet make it easier to enable in
>> a useful way.
>
>
> Sure, that would be great - the core being the ability to change these
> things without a restart. But I would argue for not letting perfection get
> in the way of progress, and do this anyway. I doubt there is any way the
> bigger change is going to get done for 10 at this point, so we should give
> people the ability to do backups off a default installation already.

We could fairly easily change wal_level without restart; its been
discussed for many years.

The problem from my perspective is that you're immediately turning off
the performance benefits for initial bulk loads.

We've had this discussion many times over. Please see for example the thread I referenced.

The conclusion has been that our defaults should really allow people to take backups of their systems, and they currently don't.

Making things run faster is tuning, and people should expect to do that if they need things to run faster. But being able to make a backup is pretty fundamental.


Arguing how that isn't a problem looks at least as time consuming as
fixing the problem.

Please do submit a patch for it. I don't know exactly what's involved in that part, I just know that people have been complaining about this at least since 9.0 was released so our track record of actually fixing it isn't very good.

I'm not arguing that it's not a problem, btw. I'm arguing that until we can solve the problem, we're much better off letting people do backups and set up things like replication than optimizing for a usecase that many never hit.

 
--

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] Replication/backup defaults
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [HACKERS] proposal: session server side variables