Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes
Дата
Msg-id CAOBaU_YWhw4pjvDR7qwE9b3C0wgT9EiVXEGBTzO3zEoe+MS5Lg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes  (SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>)
Список pgsql-hackers
On Sun, Dec 26, 2021 at 1:06 PM SATYANARAYANA NARLAPURAM
<satyanarlapuram@gmail.com> wrote:
>
> Got it, understood the concern. But can we document the limitations of the hook and let the hook take care of it? I
don'texpect an error to be thrown here since we are not planning to allocate memory or make file system calls but
insteadlook at the shared memory state and add delays when required. 

It wouldn't work.  You can't make any assumption about how long it
would take for the replication lag to resolve, so you may have to wait
for a very long time.  It means that at the very least the sleep has
to be interruptible and therefore can raise an error.  In general
there isn't much you can due in a critical section, so this approach
doesn't seem sensible to me.



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

Предыдущее
От: SATYANARAYANA NARLAPURAM
Дата:
Сообщение: Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes