Add lookup table for replication slot invalidation causes

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Add lookup table for replication slot invalidation causes
Дата
Msg-id CALj2ACUxSLA91QGFrJsWNKs58KXb1C03mbuwKmzqqmoAKLwJaw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Add lookup table for replication slot invalidation causes  (Jelte Fennema-Nio <postgres@jeltef.nl>)
Список pgsql-hackers
Hi,

Presently, replication slot invalidation causes and their text are
scattered into ReplicationSlotInvalidationCause enum and a bunch of
macros. This is making the code to get invalidation cause text given
the cause as enum and vice-versa unreadable, longer and inextensible.
The attached patch adds a lookup table for all invalidation causes for
better readability and extensibility. FWIW, another patch in
discussion https://www.postgresql.org/message-id/CALj2ACWgACB4opnbqi=x7Hc4aqcgkXoLsh1VB+gfidXaDQNu_Q@mail.gmail.com
adds a couple of other invalidation reasons, this lookup table makes
the life easier and code shorter.

Thoughts?

-- 
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Have pg_basebackup write "dbname" in "primary_conninfo"?
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: A new message seems missing a punctuation