Re: Improve WALRead() to suck data directly from WAL buffers when possible
От
Nathan Bossart
Тема
Re: Improve WALRead() to suck data directly from WAL buffers when possible
Дата
Msg-id
20230307174450.GA3267929@nathanxps13
Ответ на
Re: Improve WALRead() to suck data directly from WAL buffers when possible (Bharath Rupireddy)
Список
Дерево обсуждения
Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Dilip Kumar <dilipbalaut@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Nathan Bossart <nathandbossart@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible "Andrey M. Borodin" <x4mmm@yandex-team.ru>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Michael Paquier <michael@paquier.xyz>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Michael Paquier <michael@paquier.xyz>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Melih Mutlu <m.melihmutlu@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Jeff Davis <pgsql@j-davis.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Masahiko Sawada <sawada.mshk@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Andres Freund <andres@anarazel.de>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Masahiko Sawada <sawada.mshk@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Dilip Kumar <dilipbalaut@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Dilip Kumar <dilipbalaut@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Nathan Bossart <nathandbossart@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Nathan Bossart <nathandbossart@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Nathan Bossart <nathandbossart@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Nathan Bossart <nathandbossart@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Kuntal Ghosh <kuntalghosh.2007@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Improve WALRead() to suck data directly from WAL buffers when possible Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
On Tue, Mar 07, 2023 at 12:39:13PM +0530, Bharath Rupireddy wrote: > On Tue, Mar 7, 2023 at 3:30 AM Nathan Bossart wrote: >> Is it possible to memcpy more than a page at a time? > > It would complicate things a lot there; the logic to figure out the > last page bytes that may or may not fit in the whole page gets > complicated. Also, the logic to verify each page's header gets > complicated. We might lose out if we memcpy all the pages at once and > start verifying each page's header in another loop. Doesn't the complicated logic you describe already exist to some extent in the patch? You are copying a page at a time, which involves calculating various addresses and byte counts. >> + elog(DEBUG1, "read %zu bytes out of %zu bytes from WAL buffers for given LSN %X/%X, Timeline ID %u", >> + *read_bytes, count, LSN_FORMAT_ARGS(startptr), tli); >> >> I definitely don't think we should put an elog() in this code path. >> Perhaps this should be guarded behind WAL_DEBUG. > > Placing it behind WAL_DEBUG doesn't help users/developers. My > intention was to let users know that the WAL read hit the buffers, > it'll help them report if any issue occurs and also help developers to > debug that issue. I still think an elog() is mighty expensive for this code path, even when it doesn't actually produce any messages. And when it does, I think it has the potential to be incredibly noisy. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата: