aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2023-11-22 08:39:24 +0530
committerAmit Kapila <akapila@postgresql.org>2023-11-22 08:39:24 +0530
commitff68cc6f3bf08546802216e0b9d28ad1d4be7e70 (patch)
tree2cb6763a1b4a57150fb25cbeea57e3c75fd93c83 /src
parentcf359a053524210099c413099f36004c62ebcee0 (diff)
downloadpostgresql-ff68cc6f3bf08546802216e0b9d28ad1d4be7e70.tar.gz
postgresql-ff68cc6f3bf08546802216e0b9d28ad1d4be7e70.zip
Stop the search once the slot for replication origin is found.
In replorigin_session_setup(), we were needlessly looping for max_replication_slots even after finding an existing slot for the origin. This shouldn't hurt us much except for probably large values of max_replication_slots. Author: Antonin Houska Discussion: http://postgr.es/m/2694.1700471273@antos
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/origin.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index b0255ffd25a..460e3dcc384 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -1144,6 +1144,7 @@ replorigin_session_setup(RepOriginId node, int acquired_by)
/* ok, found slot */
session_replication_state = curstate;
+ break;
}