Re: Use read streams in CREATE DATABASE command when the strategy is wal_log

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Use read streams in CREATE DATABASE command when the strategy is wal_log
Дата
Msg-id 20240723123400.64@rfd.leadboat.com
обсуждение исходный текст
Ответ на Re: Use read streams in CREATE DATABASE command when the strategy is wal_log  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Список pgsql-hackers
On Mon, Jul 22, 2024 at 12:00:45PM +0300, Nazir Bilal Yavuz wrote:
> On Sat, 20 Jul 2024 at 21:14, Noah Misch <noah@leadboat.com> wrote:
> > On a different naming topic, my review missed that field name
> > copy_storage_using_buffer_read_stream_private.last_block doesn't fit how the
> > field is used.  Code uses it like an nblocks.  So let's either rename the
> > field or change the code to use it as a last_block (e.g. initialize it to
> > nblocks-1, not nblocks).
> 
> I prefered renaming it as nblocks, since that is how it was used in
> RelationCopyStorageUsingBuffer() before. Also, I realized that instead
> of setting p.blocknum = 0; initializing blkno as 0 and using
> p.blocknum = blkno makes sense. Because, p.blocknum and blkno should
> always start with the same block number. The relevant patch is
> attached.

I felt the local variable change was not a clear improvement.  It would have
been fine for the original patch to do it in that style, but the style of the
original patch was also fine.  So I've pushed just the struct field rename.



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

Предыдущее
От: Jeremy Schneider
Дата:
Сообщение: Re: [18] Policy on IMMUTABLE functions and Unicode updates
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: replace strtok()