<1111hq...@sina.com> writes: > I recently used benchmarksql to evaluate the performance of postgresql. I > achieved nearly 20% improvement > with NUM_XLOGINSERT_LOCKS changed from 8 to 16 under some cases of high > concurrency. I wonder whether > it is feasible to make NUM_XLOGINSERT_LOCKS a configuration parameter, so > that users can get easier to optimize > their postgresql performance through this setting.
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. regards, tom lane