Re: pgsql: Track last_inactive_time in pg_replication_slots.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pgsql: Track last_inactive_time in pg_replication_slots.
Дата
Msg-id CA+Tgmob_Ta-t2ty8QrKHBGnNLrf4ZYcwhGHGFsuUoFrAEDw4sA@mail.gmail.com
обсуждение исходный текст
Ответы Re: pgsql: Track last_inactive_time in pg_replication_slots.  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Mon, Mar 25, 2024 at 7:11 AM Amit Kapila <akapila@postgresql.org> wrote:
> Track last_inactive_time in pg_replication_slots.
>
> This commit adds a new property called last_inactive_time for slots. It is
> set to 0 whenever a slot is made active/acquired and set to the current
> timestamp whenever the slot is inactive/released or restored from the disk.
> Note that we don't set the last_inactive_time for the slots currently being
> synced from the primary to the standby because such slots are typically
> inactive as decoding is not allowed on those.

So the field name is last_inactive_time, but if I'm reading this
description right, it's actually the last time the slot was active,
except for the weird exception for slots being synced. I'm wondering
if this field needs to be renamed.

And I'm suspicious that having an exception for slots being synced is
a bad idea. That makes too much of a judgement about how the user will
use this field. It's usually better to just expose the data, and if
the user needs helps to make sense of that data, then give them that
help separately. In this case, that would mean removing the exception,
but making it easy to tell the difference between slots are inactive
because they're being synced and slots that are inactive for some
other reason.

--
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Jelte Fennema-Nio
Дата:
Сообщение: Re: session username in default psql prompt?
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Potential issue in ecpg-informix decimal converting functions