Re: Missing const in DSA.

2018-09-24 Thread Thomas Munro
On Tue, Sep 25, 2018 at 7:46 AM Thomas Munro wrote: > On Tue, Sep 25, 2018 at 4:17 AM Tom Lane wrote: > > Thomas Munro writes: > > > On Mon, Sep 24, 2018 at 9:32 AM Tom Lane wrote: > > >> Mark G writes: > > >>> While looking at some of the recent churn in DSA I noticed that > > >>> dsa_size_cl

Re: Missing const in DSA.

2018-09-24 Thread Thomas Munro
On Tue, Sep 25, 2018 at 4:17 AM Tom Lane wrote: > Thomas Munro writes: > > On Mon, Sep 24, 2018 at 9:32 AM Tom Lane wrote: > >> Mark G writes: > >>> While looking at some of the recent churn in DSA I noticed that > >>> dsa_size_class_map should probably be declared const. > > >> +1 ... also, gi

Re: Missing const in DSA.

2018-09-24 Thread Tom Lane
Thomas Munro writes: > On Mon, Sep 24, 2018 at 9:32 AM Tom Lane wrote: >> Mark G writes: >>> While looking at some of the recent churn in DSA I noticed that >>> dsa_size_class_map should probably be declared const. >> +1 ... also, given the contents of the array, "char" seems like >> rather a m

Re: Missing const in DSA.

2018-09-23 Thread Thomas Munro
On Mon, Sep 24, 2018 at 9:32 AM Tom Lane wrote: > Mark G writes: > > While looking at some of the recent churn in DSA I noticed that > > dsa_size_class_map should probably be declared const. > > +1 ... also, given the contents of the array, "char" seems like > rather a misnomer. I'd be happier i

Re: Missing const in DSA.

2018-09-23 Thread Tom Lane
Mark G writes: > While looking at some of the recent churn in DSA I noticed that > dsa_size_class_map should probably be declared const. +1 ... also, given the contents of the array, "char" seems like rather a misnomer. I'd be happier if it were declared as uint8, say. r

Missing const in DSA.

2018-09-23 Thread Mark G
While looking at some of the recent churn in DSA I noticed that dsa_size_class_map should probably be declared const. diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c index 33ab8d05d3..70ce7ce7da 100644 --- a/src/backend/utils/mmgr/dsa.c +++ b/src/backend/utils/mmgr/dsa.c @@