From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | masao(dot)fujii(at)oss(dot)nttdata(dot)com |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: max_slot_wal_keep_size and wal_keep_segments |
Date: | 2020-07-01 00:19:18 |
Message-ID: | 20200701.091918.1800516970087887428.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
At Tue, 30 Jun 2020 23:51:40 +0900, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote in
> Hi,
>
> When I talked about max_slot_wal_keep_size as new feature in v13
> at the conference, I received the question like "Why are the units of
> setting values in max_slot_wal_keep_size and wal_keep_segments
> different?"
> from audience. That difference looks confusing for users and
> IMO it's better to use the same unit for them. Thought?
We are moving the units for amount of WAL from segments to MB. The
variable is affected by the movement. I'm not sure wal_keep_segments
is going to die soon but we may change it to wal_keep_size(_mb) sooner
or later if it going to stay alive.
> There seem to be several options to do this.
>
> (1) Rename max_slot_wal_keep_size to max_slot_wal_keep_segments,
> and make users specify the number of WAL segments in it instead of
> WAL size.
I don't think this is not the way.
> (2) Rename wal_keep_segments to wal_keep_size, and make users specify
> the WAL size in it instead of the number of WAL segments.
Yes. I agree to this (as I wrote above before reading this).
> (3) Don't rename the parameters, and allow users to specify not only
> the number of WAL segments but also the WAL size in wal_keep_segments.
Possible in a short term, but not for a long term.
> Since we have been moving away from measuring in segments, e.g.,
> max_wal_size, I don't think (1) is good idea.
>
> For backward compatibility, (3) is better. But which needs more
> (maybe a bit complicated) code in guc.c. Also the parameter names
> are not consistent yet (i.e., _segments and _size).
>
> So for now I like (2).
>
> Thought?
I agree to you. If someone found that wal_keep_segment is no longer
usable, the alternative would easily be found by searching config file
for "wal_keep". Or we could have a default config line like this:
wal_keep_size = 0 # in megabytes: 0 disables (formerly wal_keep_segments)
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2020-07-01 00:22:44 | Re: Open Item: Should non-text EXPLAIN always show properties? |
Previous Message | Peter Geoghegan | 2020-07-01 00:03:25 | Deleting older versions in unique indexes to avoid page splits |