Re: Bogus sizing parameters in some AllocSetContextCreate calls - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bogus sizing parameters in some AllocSetContextCreate calls
Date
Msg-id 14922.1472395319@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bogus sizing parameters in some AllocSetContextCreate calls  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Bogus sizing parameters in some AllocSetContextCreate calls  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Re: Bogus sizing parameters in some AllocSetContextCreate calls  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Also, I think we ought to replace this code in aset.c:

>     initBlockSize = MAXALIGN(initBlockSize);
>     if (initBlockSize < 1024)
>         initBlockSize = 1024;
>     maxBlockSize = MAXALIGN(maxBlockSize);

> With this:

>     Assert(initBlockSize >= 1024 && initBlockSize == MAXALIGN(initBlockSize));
>     Assert(maxBlockSize == MAXALIGN(maxBlockSize));

Good idea --- if we'd had it that way, these errors would never have
gotten committed in the first place.  I'm for doing that only in HEAD
though.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: increasing the default WAL segment size
Next
From: Tomas Vondra
Date:
Subject: Re: Bogus sizing parameters in some AllocSetContextCreate calls