On 2014-04-26 05:40:21 -0700, David Fetter wrote: > On Sat, Apr 26, 2014 at 12:15:40AM +0200, Andres Freund wrote: > > Hi, > > > > Currently the maximum for max_connections (+ bgworkers + autovacuum) is > > defined by > > #define MAX_BACKENDS 0x7fffff > > which unfortunately means that some things like buffer reference counts > > need a full integer to store references. > > Out of curiosity, where are you finding that a 32-bit integer is > causing problems that a 16-bit one would solve?
Save space? For one it allows to shrink some structs (into one cacheline!). For another it allows to combine flags and refcount in buffer descriptors into one variable, manipulated atomically. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers