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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: refactoring relation extension and BufferAlloc(), faster COPY
Дата
Msg-id 20230221163331.7wxvu66kqzktbteb@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: refactoring relation extension and BufferAlloc(), faster COPY  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: refactoring relation extension and BufferAlloc(), faster COPY
Re: refactoring relation extension and BufferAlloc(), faster COPY
Список pgsql-hackers
On 2023-Feb-21, Heikki Linnakangas wrote:

> > +static BlockNumber
> > +BulkExtendSharedRelationBuffered(Relation rel,
> > +                                 SMgrRelation smgr,
> > +                                 bool skip_extension_lock,
> > +                                 char relpersistence,
> > +                                 ForkNumber fork, ReadBufferMode mode,
> > +                                 BufferAccessStrategy strategy,
> > +                                 uint32 *num_pages,
> > +                                 uint32 num_locked_pages,
> > +                                 Buffer *buffers)
> 
> Ugh, that's a lot of arguments, some are inputs and some are outputs. I
> don't have any concrete suggestions, but could we simplify this somehow?
> Needs a comment at least.

Yeah, I noticed this too.  I think it would be easy enough to add a new
struct that can be passed as a pointer, which can be stack-allocated
by the caller, and which holds the input arguments that are common to
both functions, as is sensible.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Update: super-fast reaction on the Postgres bugs mailing list. The report
was acknowledged [...], and a fix is under discussion.
The wonders of open-source !"
             https://twitter.com/gunnarmorling/status/1596080409259003906



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Commitfest Manager