NL_ARGMAX is the maximum number of postional arguments supported by
pritnf(3). Prior to r308145 it was declared as 99 and not enforced.
r308145 added enforcement and increased the value to 64k.
Unfortunatly, PostgreSQL used the system defintion to allocate and
zero an NL_ARGMAX * 4 sized array on the stack of it's snprintf
implementation with measureable performance impacts. This has been
fixed in new PostgreSQL versions, but old versions suffer from this
issue and it is possible that other programs suffer from this
problem.
A value of 4096 puts us on par with Linux and is certainly large enough
for any reasionable program.
Reported by: mjg