Re: Simplify standby state machine a bit in WaitForWALToBecomeAvailable()

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Simplify standby state machine a bit in WaitForWALToBecomeAvailable()
Дата
Msg-id 20230103183324.GD204418@nathanxps13
обсуждение исходный текст
Ответ на Re: Simplify standby state machine a bit in WaitForWALToBecomeAvailable()  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Simplify standby state machine a bit in WaitForWALToBecomeAvailable()
Список pgsql-hackers
On Tue, Jan 03, 2023 at 02:53:10PM +0530, Bharath Rupireddy wrote:
> In summary:
> the flow when the standby is in crash recovery is pg_wal -> [archive
> -> pg_wal -> stream] -> [archive -> pg_wal -> stream] -> [] -> [] ...
> the flow when the standby is in archive recovery is [archive -> pg_wal
> -> stream] -> [archive -> pg_wal -> stream] -> [] -> [] ...

This is my understanding as well.
 
> The proposed patch makes the inherent state change to pg_wal after
> failure to read from archive in XLogFileReadAnyTLI() to explicit by
> setting currentSource to XLOG_FROM_PG_WAL in the state machine. I
> think it doesn't alter the existing state machine or add any new extra
> lookups in pg_wal.

I'm assuming this change would simplify your other patch that modifieѕ
WaitForWALToBecomeAvailable() [0].  Is that correct?

[0] https://commitfest.postgresql.org/41/3663/

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Vik Fearing
Дата:
Сообщение: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: enable_timeout_every() and fin_time