Re: auto-sizing wal_buffers

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jaime Casanova <jaime(at)2ndquadrant(dot)com>
Cc: Greg Smith <greg(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: auto-sizing wal_buffers
Date: 2011-01-22 14:54:53
Message-ID: AANLkTinfzJxvs_yWz0Pw20gQQ_qsJNLjwynyfsHV5wcG@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jan 22, 2011 at 1:30 AM, Jaime Casanova <jaime(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Urbański 2011-01-22 15:12:00 Re: REVIEW: PL/Python table functions
Previous Message Simon Riggs 2011-01-22 13:31:14 Re: Sync Rep for 2011CF1