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