projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf359a0
)
Stop the search once the slot for replication origin is found.
author
Amit Kapila
<
[email protected]
>
Wed, 22 Nov 2023 03:09:24 +0000
(08:39 +0530)
committer
Amit Kapila
<
[email protected]
>
Wed, 22 Nov 2023 03:09:24 +0000
(08:39 +0530)
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
src/backend/replication/logical/origin.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/replication/logical/origin.c
b/src/backend/replication/logical/origin.c
index b0255ffd25a77a8cfdc7869e011836115e9efc8d..460e3dcc38464b19936b15d35c22d617093c64e8 100644
(file)
--- 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;
}