Re: Read Replica termination occurs when its max_active_replication_origins setting is lower than the primary

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: Read Replica termination occurs when its max_active_replication_origins setting is lower than the primary
Дата
Msg-id fb6cbb5a-43e0-4da0-9008-3e583b41a230@app.fastmail.com
обсуждение исходный текст
Ответ на Re: Read Replica termination occurs when its max_active_replication_origins setting is lower than the primary  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-bugs
On Wed, Sep 17, 2025, at 1:23 AM, Nathan Bossart wrote:
> I drafted up what that would look like.  One very small nitpick is that it
> messes up the alignment of the pg_controldata output.  Otherwise, it seems
> pretty straightforward.
>

As Masahiko said this behavior is not new in v18 so I wouldn't consider fix it
to v18.

I don't think your patch works for one detail: StartupReplicationOrigin() is
called earlier than CheckRequiredParameterValues(). The
StartupReplicationOrigin() uses max_active_replication_origins to emit the
PANIC message. I didn't check the implications to postpone the
StartupReplicationOrigin(). Maybe an ugly solution is to check the
max_active_replication_origins inside or even before calling
StartupReplicationOrigin().

I'm attaching a script that I used to simulate the issue. Change the GUC name
to simulate the issue in a pre v18.


-- 
Euler Taveira
EDB   https://www.enterprisedb.com/
Вложения

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