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

From: "zhangjie2(at)fujitsu(dot)com" <zhangjie2(at)fujitsu(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "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-06-25 06:15:59
Message-ID: TYWPR01MB7678D3AE538F6BBAAD11D757F9069@TYWPR01MB7678.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

Thank you for your suggestions. initdb.c and guc.c have been modified together.

Best Regards!
Zhangjie

-----Original Message-----
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Sent: Thursday, June 24, 2021 11:50 PM
To: Zhang, Jie/张 杰 <zhangjie2(at)fujitsu(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [Patch] change the default value of shared_buffers in postgresql.conf.sample

"zhangjie2(at)fujitsu(dot)com" <zhangjie2(at)fujitsu(dot)com> writes:
> In PostgreSQL 14, The default value of shared_buffers is 128MB, but in postgresql.conf.sample, the default value of shared_buffers is 32MB.
> I think the following changes should be made.

> File: postgresql\src\backend\utils\misc\ postgresql.conf.sample
> #shared_buffers = 32MB => #shared_buffers = 128MB

As submitted, this patch breaks initdb, which is looking for the exact string "#shared_buffers = 32MB".

We could adjust that too of course, but I'm dubious first that any change is needed, and second that this is the right one:

1. Since initdb will replace that string, users will never see this entry as-is in live databases. So is it worth doing anything?

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.

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.

regards, tom lane

Attachment Content-Type Size
postgresql.conf.sample_0625.patch application/octet-stream 1.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-06-25 06:54:24 Allow streaming the changes after speculative aborts.
Previous Message Peter Eisentraut 2021-06-25 06:03:13 Re: Remove redundant variable pageSize in gistinitpage