Re: Improve WALRead() to suck data directly from WAL buffers when possible
| От | Jeff Davis |
|---|---|
| Тема | Re: Improve WALRead() to suck data directly from WAL buffers when possible |
| Дата | |
| Msg-id | edf041b75c4cc59787f614998b4619b06dddfb06.camel@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
|
| Список | pgsql-hackers |
On Mon, 2024-02-12 at 12:18 -0800, Andres Freund wrote:
> + upto = Min(startptr + count, LogwrtResult.Write);
> + nbytes = upto - startptr;
>
> Shouldn't it pretty much be a bug to ever encounter this?
In the current code it's impossible, though Bharath hinted at an
extension which could reach that path.
What I committed was a bit of a compromise -- earlier versions of the
patch supported reading right up to the Insert pointer (which requires
a call to WaitXLogInsertionsToFinish()). I wasn't ready to commit that
code without seeing a more about how that would be used, but I thought
it was reasonable to have some simple code in there to allow reading up
to the Write pointer.
It seems closer to the structure that we will ultimately need to
replicate unflushed data, right?
Regards,
Jeff Davis
[1]
https://www.postgresql.org/message-id/CALj2ACW65mqn6Ukv57SqDTMzAJgd1N_AdQtDgy+gMDqu6v618Q@mail.gmail.com
В списке pgsql-hackers по дате отправления: