pgsql: Move replication slot release to before_shmem_exit().
От | Andres Freund |
---|---|
Тема | pgsql: Move replication slot release to before_shmem_exit(). |
Дата | |
Msg-id | E1nJmLp-0001ym-3x@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Move replication slot release to before_shmem_exit(). Previously, replication slots were released in ProcKill() on error, resulting in reporting replication slot drop of ephemeral slots after the stats subsystem was already shut down. To fix this problem, move replication slot release to a before_shmem_exit() hook that is called before the stats collector shuts down. There wasn't really a good reason for the slot handling to be in ProcKill() anyway. Patch by Masahiko Sawada, with very minor polishing by me. I, Andres, wrote a test for dropping slots during process exit, but there may be some OS dependent issues around the number of times FATAL error messages are displayed due to a still debated libpq issue. So that test will be committed separately / later. Reviewed-By: Kyotaro Horiguchi <horikyota.ntt@gmail.com> Reviewed-By: Andres Freund <andres@anarazel.de> Author: Masahiko Sawada <sawada.mshk@gmail.com> Discussion: https://postgr.es/m/CAD21AoDAeEpAbZEyYJsPZJUmSPaRicVSBObaL7sPaofnKz+9zg@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/2f6501fa3c54bbe4568e3bcccd9a60d26a46b5ee Modified Files -------------- src/backend/replication/slot.c | 25 +++++++++++++++++++++++++ src/backend/storage/lmgr/proc.c | 7 ------- src/backend/tcop/postgres.c | 4 ++-- src/backend/utils/init/postinit.c | 7 +++++++ src/include/replication/slot.h | 1 + 5 files changed, 35 insertions(+), 9 deletions(-)
В списке pgsql-committers по дате отправления: