Add lookup table for replication slot conflict reasons
Michael Paquier <michael@paquier.xyz>
Add lookup table for replication slot conflict reasons This commit switches the handling of the conflict cause strings for replication slots to use a table rather than being explicitly listed, using a C99-designated initializer syntax for the array elements. This makes the whole more readable while easing future maintenance with less areas to update when adding a new conflict reason. This is similar to 74a730631065, but the scale of the change is smaller as there are less conflict causes than LWLock builtin tranche names. Author: Bharath Rupireddy Reviewed-by: Jelte Fennema-Nio Discussion: https://postgr.es/m/CALj2ACUxSLA91QGFrJsWNKs58KXb1C03mbuwKmzqqmoAKLwJaw@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/replication/slot.c | modified | +32 −13 |
| src/backend/replication/slotfuncs.c | modified | +6 −18 |
| src/include/replication/slot.h | modified | +5 −8 |
Discussion
- Add lookup table for replication slot invalidation causes 13 messages · 2024-02-20 → 2024-02-23