pgsql: Fix minor bug in logical-replication walsender shutdown

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема pgsql: Fix minor bug in logical-replication walsender shutdown
Дата
Msg-id E1iL5ZW-0006Hw-7C@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix minor bug in logical-replication walsender shutdown

Logical walsender should exit when it catches up with sending WAL during
shutdown; but there was a rare corner case when it failed to because of
a race condition that puts it back to wait for more WAL instead -- but
since there wasn't any, it'd not shut down immediately.  It would only
continue the shutdown when wal_sender_timeout terminates the sleep,
which causes annoying waits during shutdown procedure.  Restructure the
code so that we no longer forget to set WalSndCaughtUp in that case.

This was an oversight in commit c6c333436.

Backpatch all the way down to 9.4.

Author: Craig Ringer, Álvaro Herrera
Discussion: https://postgr.es/m/CAMsr+YEuz4XwZX_QmnX_-2530XhyAmnK=zCmicEnq1vLr0aZ-g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/38ddeab13b4b86161799c097dea4bdf9be60924a

Modified Files
--------------
src/backend/replication/walsender.c | 45 ++++++++++++++-----------------------
1 file changed, 17 insertions(+), 28 deletions(-)


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix parallel restore of FKs to partitioned tables
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: pgsql: Fix bug that could try to freeze running multixacts.