Re: min_safe_lsn column in pg_replication_slots view

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: min_safe_lsn column in pg_replication_slots view
Дата
Msg-id 20200630180922.GA13453@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: min_safe_lsn column in pg_replication_slots view  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
On 2020-Jun-30, Fujii Masao wrote:

> Sorry this is not true. That distance can be calculated without those operators.
> For example,
> 
> SELECT restart_lsn - pg_current_wal_lsn() + (SELECT setting::numeric * 1024 * 1024 FROM pg_settings WHERE name =
'max_slot_wal_keep_size')distance FROM pg_replication_slots;
 
> 
> If the calculated distance is small or negative value, which means that
> we may lose some required WAL files. So in this case it's worth considering
> to increase max_slot_wal_keep_size.

... OK, but you're forgetting wal_keep_segments.

> I still think it's better and more helpful to display something like
> that distance in pg_replication_slots rather than making each user
> calculate it...

Agreed.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: SQL-standard function body
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: SQL-standard function body