diff options
author | Fujii Masao <fujii@postgresql.org> | 2020-06-19 17:15:52 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2020-06-19 17:16:34 +0900 |
commit | 08aa3151e7308556130c644c237fa4b20dfd6eba (patch) | |
tree | 9fe9172240ced2515c1a8dcd9a0030e8427e0289 /src/backend/access/spgist/spgxlog.c | |
parent | bdee4af8e07648008fe522fc5a562db453be5ad7 (diff) | |
download | postgresql-08aa3151e7308556130c644c237fa4b20dfd6eba.tar.gz postgresql-08aa3151e7308556130c644c237fa4b20dfd6eba.zip |
Fix issues in invalidation of obsolete replication slots.
This commit fixes the following issues.
1. There is the case where the slot is dropped while trying to invalidate it.
InvalidateObsoleteReplicationSlots() did not handle this case, and
which could cause checkpoint to fail.
2. InvalidateObsoleteReplicationSlots() could emit the same log message
multiple times unnecessary. It should be logged only once.
3. When marking the slot as used, we always searched the target slot from
all the replication slots even if we already found it. This could cause
useless waste of cycles.
Back-patch to v13 where these issues were added as a part of
max_slot_wal_keep_size code.
Author: Fujii Masao
Reviewed-by: Kyotaro Horiguchi, Alvaro Herrera
Discussion: https://postgr.es/m/66c05b67-3396-042c-1b41-bfa6c3ddcf82@oss.nttdata.com
Diffstat (limited to 'src/backend/access/spgist/spgxlog.c')
0 files changed, 0 insertions, 0 deletions