Re: auto-sizing wal_buffers - Mailing list pgsql-hackers

From Robert Haas
Subject Re: auto-sizing wal_buffers
Date
Msg-id AANLkTinfzJxvs_yWz0Pw20gQQ_qsJNLjwynyfsHV5wcG@mail.gmail.com
Whole thread Raw
In response to Re: auto-sizing wal_buffers  (Jaime Casanova <jaime@2ndquadrant.com>)
List pgsql-hackers
On Sat, Jan 22, 2011 at 1:30 AM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
> why is this better than using XLOG_BUFFER_MIN? (the same for the 8
> buffers assigned just above of it)
>
> +       else if (XLOGbuffers < 4)
> +               XLOGbuffers = 4;

Oh, good point.  Woops.

> also this
> +       Assert(XLOGbuffers > 0);
> maybe should be
>        Assert(XLOGbuffers >= XLOG_BUFFER_MIN);

I think that's slightly less clear about the point of the assertion,
which is to make sure we're at least allocating something.

> while you move the code, why didn't you keep this comment?
> -                                       /*
> -                                        * Use int64 arithmetic to avoid overflows in units
> -                                        * conversion.
> -                                        */

Because I suck.  Will fix.

Thanks for the fast and detailed review.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Sync Rep for 2011CF1
Next
From: Jan Urbański
Date:
Subject: Re: REVIEW: PL/Python table functions