pgsql: Stop the search once the slot for replication origin is found.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Stop the search once the slot for replication origin is found.
Date: 2023-11-22 03:16:05
Message-ID: E1r5dif-006d58-EE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ff68cc6f3bf08546802216e0b9d28ad1d4be7e70

Modified Files
--------------
src/backend/replication/logical/origin.c | 1 +
1 file changed, 1 insertion(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2023-11-22 06:25:09 pgsql: Fix the initial sync tables with no columns.
Previous Message Bruce Momjian 2023-11-22 01:09:44 pgsql: doc: FreeBSD uses camcontrol identify, not atacontrol, for cache