Re: refactoring relation extension and BufferAlloc(), faster COPY

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: refactoring relation extension and BufferAlloc(), faster COPY
Дата
Msg-id 20230211223340.wkgrfdu3utd7ypi4@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: refactoring relation extension and BufferAlloc(), faster COPY  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

On 2023-02-11 14:25:06 -0800, Andres Freund wrote:
> On 2023-01-20 13:40:55 +1300, David Rowley wrote:
> > v2-0004:
> > 
> > 5. Is it worth having two versions of PinLocalBuffer() one to adjust
> > the usage count and one that does not? Couldn't the version that does
> > not adjust the count skip doing pg_atomic_read_u32()?
> 
> I think it'd be nicer to just move the read inside the if
> (adjust_usagecount). That way the rest of the function doesn't have to be
> duplicated.

Ah, no, we need it for the return value. No current users of
  PinLocalBuffer(adjust_usagecount = false)
need the return value, but I don't think that's necessarily the case.

I'm somewhat inclined to not duplicate it, but if you think it's worth it,
I'll do that.

Greetings,

Andres Freund



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: refactoring relation extension and BufferAlloc(), faster COPY
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?