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
20221008215221.GA894639@nathanxps13
Ответ на
Re: Switching XLog source from archive to streaming when primary available (Bharath Rupireddy)
Список
Дерево обсуждения
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 Mon, Sep 19, 2022 at 07:49:21PM +0530, Bharath Rupireddy wrote: > SwitchFromArchiveToStreamEnabled() seemed better at this point. I'm > attaching the v7 patch with that change. Please review it further. As I mentioned upthread [0], I'm still a little concerned that this patch will cause the state machine to go straight from archive recovery to streaming replication, skipping recovery from pg_wal. I wonder if this could be resolved by moving the standby to the pg_wal phase instead. Concretely, this line + if (switchSource) + break; would instead change currentSource from XLOG_FROM_ARCHIVE to XLOG_FROM_PG_WAL before the call to XLogFileReadAnyTLI(). I suspect the behavior would be basically the same, but it would maintain the existing ordering. However, I do see the following note elsewhere in xlogrecovery.c: * The segment can be fetched via restore_command, or via walreceiver having * streamed the record, or it can already be present in pg_wal. Checking * pg_wal is mainly for crash recovery, but it will be polled in standby mode * too, in case someone copies a new segment directly to pg_wal. That is not * documented or recommended, though. Given this information, the present behavior might not be too important, but I don't see a point in changing it without good reason. [0] https://postgr.es/m/20220906215704.GA2084086%40nathanxps13 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления
От: Nathan Bossart
Дата: