From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Decrease MAX_BACKENDS to 2^16 |
Date: | 2014-04-26 13:19:52 |
Message-ID: | 20140426131952.GE13906@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-04-26 14:56:33 | Re: Hashable custom types |
Previous Message | Andres Freund | 2014-04-26 13:15:22 | Re: Decrease MAX_BACKENDS to 2^16 |