Re: [Patch] change the default value of shared_buffers in postgresql.conf.sample

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "zhangjie2(at)fujitsu(dot)com" <zhangjie2(at)fujitsu(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [Patch] change the default value of shared_buffers in postgresql.conf.sample
Date: 2021-08-18 17:48:44
Message-ID: 20210818174844.GD13002@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 29, 2021 at 09:28:04AM +0200, Magnus Hagander wrote:
> > 1. Since initdb will replace that string, users will never see this
> > entry as-is in live databases. So is it worth doing anything?
>
> It's not entirely uncommon that users copy the .sample file into their
> configuration management system and then generate the real config from
> that using templates. These users will definitely see it (and
> overwrite it).
>
>
> > 2. The *actual*, hard-wired, default in guc.c is 1024 (8MB), not
> > either of these numbers. So maybe the sample file ought to use
> > that instead. Or maybe we should change that value too ... it's
> > surely as obsolete as can be.
>
> +1 for changing this one as well. It'a always been slightly confusing,
> since it's what shows up in pg_settings. If anything I'd consider that
> an oversight when the defaults were changed back then...
>
>
> > On the whole this seems pretty cosmetic so I'm inclined to leave
> > it alone. But if we were going to do anything I think that
> > adjusting both initdb.c and guc.c to use 128MB might be the
> > most appropriate thing.
>
> It is mostly cosmetic, but it is cosmetic at a level that can cause at
> least a small amount of confusion for users, so I'm definitely +1 for
> cleaning it up.

Yes, I liked this patch from June for the reasons outlined above. I
don't think there is any logic to why pg_settings shows 8MB and
postgresql.conf.sample has 32MB, and this has been true since PG 10.

I think the only question is whether this is a PG 15-only patch or a
patckpatch to PG 10; I am in favor of the later.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

If only the physical world exists, free will is an illusion.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2021-08-18 18:02:22 Re: strange case of "if ((a & b))"
Previous Message alvherre@alvh.no-ip.org 2021-08-18 17:45:23 Re: archive status ".ready" files may be created too early