pgsql: Make GetSlotInvalidationCause() return RS_INVAL_NONE on unexpect

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make GetSlotInvalidationCause() return RS_INVAL_NONE on unexpect
Date: 2024-02-22 11:00:58
Message-ID: E1rd6p0-0007iZ-5X@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make GetSlotInvalidationCause() return RS_INVAL_NONE on unexpected input

943f7ae1c869 has changed GetSlotInvalidationCause() so as it would
return the last element of SlotInvalidationCauses[] when an incorrect
conflict reason name is given by a caller, but this should return
RS_INVAL_NONE in such cases, even if such a state should never be
reached in practice.

Per gripe from Peter Smith.

Reviewed-by: Bharath Rupireddy
Discussion: https://postgr.es/m/CAHut+PtsrSWxczpGkSaSVtJo+BXrvJ3Hwp5gES14bbL-G+HL7A@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/replication/slot.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2024-02-22 13:08:10 pgsql: Fix BF failure in commit 93db6cbda0.
Previous Message Amit Kapila 2024-02-22 10:07:34 pgsql: Add a new slot sync worker to synchronize logical slots.