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

Поиск
Список
Период
Сортировка
Искать
От
Nathan Bossart
Тема
Re: Switching XLog source from archive to streaming when primary available
Дата
Msg-id
20220909165950.GB2254174@nathanxps13
Ответ на
Список
Дерево обсуждения
Switching XLog source from archive to streaming when primary available SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Dilip Kumar <dilipbalaut@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Cary Huang <cary.huang@highgo.ca>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@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 Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Ian Lawrence Barwick <barwick@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Japin Li <japinli@hotmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Japin Li <japinli@hotmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@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 Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Michael Paquier <michael@paquier.xyz>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available "Andrey M. Borodin" <x4mmm@yandex-team.ru>
Re: Switching XLog source from archive to streaming when primary available John H <johnhyvr@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Switching XLog source from archive to streaming when primary available John H <johnhyvr@gmail.com>
Re: Switching XLog source from archive to streaming when primary available Kyotaro Horiguchi <horikyota.ntt@gmail.com>
On Fri, Sep 09, 2022 at 12:14:25PM +0530, Bharath Rupireddy wrote:
> On Fri, Sep 9, 2022 at 10:57 AM Kyotaro Horiguchi
>  wrote:
>> At Thu, 8 Sep 2022 10:53:56 -0700, Nathan Bossart  wrote in
>> > My general point is that we should probably offer some basic preventative
>> > measure against flipping back and forth between streaming and archive
>> > recovery while making zero progress.  As I noted, maybe that's as simple as
>> > having WaitForWALToBecomeAvailable() attempt to restore a file from archive
>> > at least once before the new parameter forces us to switch to streaming
>> > replication.  There might be other ways to handle this.
>>
>> +1.
> 
> Hm. In that case, I think we can get rid of timeout based switching
> mechanism and have this behaviour - the standby can attempt to switch
> to streaming mode from archive, say, after fetching 1, 2 or a
> configurable number of WAL files. In fact, this is the original idea
> proposed by Satya in this thread.

IMO the timeout approach would be more intuitive for users.  When it comes
to archive recovery, "WAL segment" isn't a standard unit of measure.  WAL
segment size can differ between clusters, and WAL files can have different
amounts of data or take different amounts of time to replay.  So I think it
would be difficult for the end user to decide on a value.  However, even
the timeout approach has this sort of problem.  If your parameter is set to
1 minute, but the current archive takes 5 minutes to recover, you won't
really be testing streaming replication once a minute.  That would likely
need to be documented.

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


В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Justin Pryzby
Дата:
FAQ