Re: Make NUM_XLOGINSERT_LOCKS configurable
От
Michael Paquier
Тема
Re: Make NUM_XLOGINSERT_LOCKS configurable
Дата
Msg-id
ZZ4YV6B3yno2Vcb5@paquier.xyz
Ответ на
Re: Make NUM_XLOGINSERT_LOCKS configurable (Tom Lane)
Список
Дерево обсуждения
Make NUM_XLOGINSERT_LOCKS configurable <1111hqshj@sina.com>
Re: Make NUM_XLOGINSERT_LOCKS configurable Tom Lane <tgl@sss.pgh.pa.us>
Re: Make NUM_XLOGINSERT_LOCKS configurable Michael Paquier <michael@paquier.xyz>
Re: Make NUM_XLOGINSERT_LOCKS configurable Tom Lane <tgl@sss.pgh.pa.us>
Re: Make NUM_XLOGINSERT_LOCKS configurable Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Make NUM_XLOGINSERT_LOCKS configurable Tom Lane <tgl@sss.pgh.pa.us>
Re: Make NUM_XLOGINSERT_LOCKS configurable Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: Make NUM_XLOGINSERT_LOCKS configurable Jim Nasby <jim.nasby@gmail.com>
Re: Make NUM_XLOGINSERT_LOCKS configurable Jakub Wartak <jakub.wartak@enterprisedb.com>
On Tue, Jan 09, 2024 at 09:38:17PM -0500, Tom Lane wrote: > Making it an actual GUC would carry nontrivial costs, not least that > there are hot code paths that do "foo % NUM_XLOGINSERT_LOCKS" which > would go from a mask operation to a full integer divide. We are > unlikely to consider that on the basis of an unsupported assertion > that there's a performance gain under unspecified conditions. > > Even with data to justify a change, I think it'd make a lot more sense > to just raise the constant value. This suggestion has showed up more than once in the past, and WAL insertion is a path that can become so hot under some workloads that changing it to a GUC would not be wise from the point of view of performance. Redesigning all that to not require a set of LWLocks into something more scalable would lead to better result, whatever this design may be. -- Michael
В списке pgsql-hackers по дате отправления