bgwriter_lru_maxpages limits in PG 10 sample conf

Started by Sergei Kornilovalmost 7 years ago9 messages
1 attachment(s)

Hello

We increased bgwriter_lru_maxpages limit in 10 release [1]. Docs now are changed correctly but in REL_10_STABLE postgresql.conf.sample we still have comment "0-1000 max buffers written/round".
Master (and REL_11_STABLE) was updated later in 611fe7d4793ba6516e839dc50b5319b990283f4f, but not REL_10. I think we need backpatch this line.

* /messages/by-id/f6e58a22-030b-eb8a-5457-f62fb08d701c@BlueTreble.com

regards, Sergei

Attachments:

backpatch_10_bgwriter_lru_maxpages_conf_sample.patchtext/x-diff; name=backpatch_10_bgwriter_lru_maxpages_conf_sample.patchDownload
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 3e68afd275..1c97f59ed3 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -155,7 +155,7 @@
 # - Background Writer -
 
 #bgwriter_delay = 200ms			# 10-10000ms between rounds
-#bgwriter_lru_maxpages = 100		# 0-1000 max buffers written/round
+#bgwriter_lru_maxpages = 100		# max buffers written/round, 0 disables
 #bgwriter_lru_multiplier = 2.0		# 0-10.0 multiplier on buffers scanned/round
 #bgwriter_flush_after = 0		# measured in pages, 0 disables
 
#2Robert Haas
robertmhaas@gmail.com
In reply to: Sergei Kornilov (#1)
Re: bgwriter_lru_maxpages limits in PG 10 sample conf

On Wed, Feb 20, 2019 at 5:53 AM Sergei Kornilov <sk@zsrv.org> wrote:

We increased bgwriter_lru_maxpages limit in 10 release [1]. Docs now are changed correctly but in REL_10_STABLE postgresql.conf.sample we still have comment "0-1000 max buffers written/round".
Master (and REL_11_STABLE) was updated later in 611fe7d4793ba6516e839dc50b5319b990283f4f, but not REL_10. I think we need backpatch this line.

I'm a bit reluctant to whack postgresql.conf around in back-branches
because sometimes that makes funny things happen when somebody
upgrades, e.g. via RPM. I don't remember exactly what happens but I
think typically either the new file overwrites the existing file which
gets moved to something like postgresql.conf.rpmsave or the new file
is written into postgresql.conf.rpmnew instead of the original
location. I don't think it's worth making stuff like that happen for
the sake of a comment.

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

In reply to: Robert Haas (#2)
Re: bgwriter_lru_maxpages limits in PG 10 sample conf

Hello

I'm a bit reluctant to whack postgresql.conf around in back-branches
because sometimes that makes funny things happen when somebody
upgrades, e.g. via RPM.

If i remember correctly both deb and rpm packages will ask user about config difference.
But good point, comment change is too small difference. I am a bit late, good time for such change was before last minor release (we add data_sync_retry and config was changed anyway).

regards, Sergei

#4Bruce Momjian
bruce@momjian.us
In reply to: Sergei Kornilov (#3)
Re: bgwriter_lru_maxpages limits in PG 10 sample conf

On Wed, Feb 20, 2019 at 11:54:25PM +0300, Sergei Kornilov wrote:

Hello

I'm a bit reluctant to whack postgresql.conf around in back-branches
because sometimes that makes funny things happen when somebody
upgrades, e.g. via RPM.

If i remember correctly both deb and rpm packages will ask user about config difference.
But good point, comment change is too small difference. I am a bit late, good time for such change was before last minor release (we add data_sync_retry and config was changed anyway).

The other issue is that you will change share/postgresql.conf.sample,
but not $PGDATA/postgresql.conf until initdb is run, meaning if someone
diffs the two files, they will see differences that they did not make.
Making defaults more accurate is not worth that confusion.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +
In reply to: Bruce Momjian (#4)
Re: bgwriter_lru_maxpages limits in PG 10 sample conf

Hello

postgresql.conf.sample was changed recently in REL_10_STABLE (commit ab1d9f066aee4f9b81abde6136771debe0191ae8)
So config will be changed in next minor release anyway. We have another reason to not fix bgwriter_lru_maxpages comment?

regards, Sergei

#6Bruce Momjian
bruce@momjian.us
In reply to: Sergei Kornilov (#5)
Re: bgwriter_lru_maxpages limits in PG 10 sample conf

On Thu, Feb 28, 2019 at 10:28:44AM +0300, Sergei Kornilov wrote:

Hello

postgresql.conf.sample was changed recently in REL_10_STABLE (commit ab1d9f066aee4f9b81abde6136771debe0191ae8)
So config will be changed in next minor release anyway. We have another reason to not fix bgwriter_lru_maxpages comment?

Frankly, I was surprised postgresql.conf.sample was changed in a back
branch since it will cause people who diff $PGDATA/postgresql.conf with
share/postgresql.conf.sample to see differences they didn't make.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +
#7Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Bruce Momjian (#6)
Re: bgwriter_lru_maxpages limits in PG 10 sample conf

On 2019-Mar-04, Bruce Momjian wrote:

On Thu, Feb 28, 2019 at 10:28:44AM +0300, Sergei Kornilov wrote:

Hello

postgresql.conf.sample was changed recently in REL_10_STABLE (commit ab1d9f066aee4f9b81abde6136771debe0191ae8)
So config will be changed in next minor release anyway. We have another reason to not fix bgwriter_lru_maxpages comment?

Frankly, I was surprised postgresql.conf.sample was changed in a back
branch since it will cause people who diff $PGDATA/postgresql.conf with
share/postgresql.conf.sample to see differences they didn't make.

I think the set of people that execute diffs of their production conf
file against the sample file to be pretty small -- maybe even empty. If
you're really interested in knowing the changes you've done, you're more
likely to use a version control system on the file anyway.

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#8Bruce Momjian
bruce@momjian.us
In reply to: Alvaro Herrera (#7)
Re: bgwriter_lru_maxpages limits in PG 10 sample conf

On Tue, Mar 5, 2019 at 12:24:14AM -0300, Alvaro Herrera wrote:

On 2019-Mar-04, Bruce Momjian wrote:

On Thu, Feb 28, 2019 at 10:28:44AM +0300, Sergei Kornilov wrote:

Hello

postgresql.conf.sample was changed recently in REL_10_STABLE (commit ab1d9f066aee4f9b81abde6136771debe0191ae8)
So config will be changed in next minor release anyway. We have another reason to not fix bgwriter_lru_maxpages comment?

Frankly, I was surprised postgresql.conf.sample was changed in a back
branch since it will cause people who diff $PGDATA/postgresql.conf with
share/postgresql.conf.sample to see differences they didn't make.

I think the set of people that execute diffs of their production conf
file against the sample file to be pretty small -- maybe even empty. If
you're really interested in knowing the changes you've done, you're more
likely to use a version control system on the file anyway.

Well, if this is true, then we should all agree to backpatch to
postgresql.conf.sample more often.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +
In reply to: Bruce Momjian (#8)
Re: bgwriter_lru_maxpages limits in PG 10 sample conf

Hello

Well, actually we change postgresql.conf.sample in back-branches. Recently was yet another commit in REL_10_STABLE: fea2cab70de8d190762996c7c447143fb47bcfa3
I think we need fix incosistent comment for bgwriter_lru_maxpages

regards, Sergei