Re: promotion related handling in pg_sync_replication_slots()

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: promotion related handling in pg_sync_replication_slots()
Дата
Msg-id CAA4eK1+MVF7xfeB+oprEHfdCL4tdiZv1kQ8=2FhdTq=XL18u2w@mail.gmail.com
обсуждение исходный текст
Ответ на [MASSMAIL]promotion related handling in pg_sync_replication_slots()  (shveta malik <shveta.malik@gmail.com>)
Ответы Re: promotion related handling in pg_sync_replication_slots()  (shveta malik <shveta.malik@gmail.com>)
Список pgsql-hackers
On Thu, Apr 4, 2024 at 5:05 PM shveta malik <shveta.malik@gmail.com> wrote:
>
> Hello hackers,
>
> Currently, promotion related handling is missing in the slot sync SQL
> function pg_sync_replication_slots().   Here is the background on how
> it is done in slot sync worker:
> During promotion, the startup process in order to shut down the
> slot-sync worker, sets the 'stopSignaled' flag, sends the shut-down
> signal, and waits for slot sync worker to exit. Meanwhile if the
> postmaster has not noticed the promotion yet, it may end up restarting
> slot sync worker. In such a case, the worker exits if 'stopSignaled'
> is set.
>
> Since there is a chance that the user (or any of his scripts/tools)
> may execute SQL function pg_sync_replication_slots() in parallel to
> promotion, such handling is needed in this SQL function as well, The
> attached patch attempts to implement the same.
>

Thanks for the report and patch. I'll look into it.

--
With Regards,
Amit Kapila.



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Streaming read-ready sequential scan code
Следующее
От: Bertrand Drouvot
Дата:
Сообщение: Re: Autogenerate some wait events code and documentation