Re: Switching XLog source from archive to streaming when primary available

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Switching XLog source from archive to streaming when primary available
Дата
Msg-id CALj2ACVict-k-r94VYkJ3RB8=b-=hotS7N=e2_PmndFEke2r8w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Switching XLog source from archive to streaming when primary available  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Switching XLog source from archive to streaming when primary available  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Wed, Mar 6, 2024 at 1:22 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> I was thinking of something more like
>
>         typedef enum
>         {
>                 NO_FORCE_SWITCH_TO_STREAMING,           /* no switch necessary */
>                 FORCE_SWITCH_TO_STREAMING_PENDING,      /* exhausting pg_wal */
>                 FORCE_SWITCH_TO_STREAMING,                      /* switch to streaming now */
>         } WALSourceSwitchState;
>
> At least, that illustrates my mental model of the process here.  IMHO
> that's easier to follow than two similarly-named bool variables.

I played with that idea and it came out very nice. Please see the
attached v22 patch. Note that personally I didn't like "FORCE" being
there in the names, so I've simplified them a bit.

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

Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: remaining sql/json patches
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Synchronizing slots from primary to standby