aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/network_spgist.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2025-06-27 11:49:00 +0300
committerAlexander Korotkov <akorotkov@postgresql.org>2025-06-27 11:49:00 +0300
commit7195c804bd12f47a9f1b2df9c2e1794bb04c5987 (patch)
treebf6ec6d5f940b3883d0e10de95c72a182294d3db /src/backend/utils/adt/network_spgist.c
parent94e2e150ec72a3b37e3847be99c4aca3320c38f9 (diff)
downloadpostgresql-7195c804bd12f47a9f1b2df9c2e1794bb04c5987.tar.gz
postgresql-7195c804bd12f47a9f1b2df9c2e1794bb04c5987.zip
Fix CheckPointReplicationSlots() with max_replication_slots == 0
ca307d5cec90 made CheckPointReplicationSlots() unconditionally call ReplicationSlotsComputeRequiredLSN(). It causes an assertion trap when max_replication_slots equals 0. This commit makes CheckPointReplicationSlots() call ReplicationSlotsComputeRequiredLSN() only when at least one slot gets its last_saved_restart_lsn updated. That avoids an assert trap and also saves some cycles when no one slot has last_saved_restart_lsn updated. Based on ideas from Dilip Kumar <dilipbalaut@gmail.com> and Hayato Kuroda <kuroda.hayato@fujitsu.com>. Reported-by: Zhijie Hou <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/OS0PR01MB5716BB506AF934376FF3A8BB947BA%40OS0PR01MB5716.jpnprd01.prod.outlook.com
Diffstat (limited to 'src/backend/utils/adt/network_spgist.c')
0 files changed, 0 insertions, 0 deletions