Re: more descriptive message for process termination due to max_slot_wal_keep_size

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: more descriptive message for process termination due to max_slot_wal_keep_size
Дата
Msg-id 20220104.102931.1400105396066285349.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: more descriptive message for process termination due to max_slot_wal_keep_size  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: more descriptive message for process termination due to max_slot_wal_keep_size  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
At Fri, 24 Dec 2021 20:23:29 +0900, Masahiko Sawada <sawada.mshk@gmail.com> wrote in 
> On Fri, Dec 24, 2021 at 5:30 PM Kyotaro Horiguchi
> <horikyota.ntt@gmail.com> wrote:
> > Right. But I believe the two are not assumed to be used at once. One
> > can set wal_keep_size larger than max_slot_wal_keep_size but it is
> > actually a kind of ill setting.
> >
> > LOG:  terminating process %d to release replication slot \"%s\" because its restart_lsn %X/%X exceeds
max_slot_wal_keep_size
> > DETAIL:  The slot got behind the limit %X/%X determined by max_slot_wal_keep_size and wal_keep_size.
> >
> > Mmm. I don't like this.  I feel we don't need such detail in the
> > message.
> 
> How about something like:
> 
> LOG:  terminating process %d to release replication slot \"%s\"
> because its restart_lsn %X/%X exceeds the limit
> DETAIL:  The slot got behind the limit %X/%X
> HINT: You might need to increase max_slot_wal_keep_size or wal_keep_size.

The message won't be seen when max_slot_wal_keep_size is not set. So
we don't recommend to increase wal_keep_size in that case. We might
need inhibit (or warn)the two parameters from being activated at once,
but it would be another issue.

Another point is how people determine the value for the parameter.  I
suppose (or believe) max_slot_wal_keep_size is not a kind to set to
minimal first then increase later but a kind to set to maximum
allowable first.  On the other hand we suggest as the follows for
too-small max_wal_size so we could do the same for this parameter.

> HINT:  Consider increasing the configuration parameter \"max_wal_size\".

Also, I don't like we have three lines for this message. If the DETAIL
adds only the specific value of the limit, I think it'd better append
it to the main message.

So what do you say if I propose the following?

LOG:  terminating process %d to release replication slot \"%s\"
because its restart_lsn %X/%X exceeds the limit %X/%X
HINT: You might need to increase max_slot_wal_keep_size.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: An obsolete comment of pg_stat_statements
Следующее
От: Melanie Plageman
Дата:
Сообщение: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)