Re: max_slot_wal_keep_size comment in postgresql.conf - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: max_slot_wal_keep_size comment in postgresql.conf
Date
Msg-id 20200527.162159.1771439113156190641.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: max_slot_wal_keep_size comment in postgresql.conf  (Michael Paquier <michael@paquier.xyz>)
Responses Re: max_slot_wal_keep_size comment in postgresql.conf
List pgsql-hackers
At Wed, 27 May 2020 15:11:00 +0900, Michael Paquier <michael@paquier.xyz> wrote in 
> On Wed, May 27, 2020 at 10:46:27AM +0900, Kyotaro Horiguchi wrote:
> > Agreed. It should be a leftover at the time the unit was changed
> > (before committed) to MB from bytes.  The default value makes the
> > confusion worse.
> > 
> > Is the following works?
> > 
> > #max_slot_wal_keep_size = -1  # in MB; -1 disables
> 
> Indeed, better to fix that.  The few GUCs using memory units that have
> such a mention in their comments use the actual name of the memory
> unit, and not its abbreviation (see log_temp_files).  So it seems more

I was not sure which is preferable.  Does that mean we will fix the
following, too?

> #temp_file_limit = -1           # limits per-process temp file space
>                     # in kB, or -1 for no limit

> logic to me to just use "in megabytes; -1 disables", that would be
> also more consistent with the time-unit-based ones.

I don't oppose to full-spelling.  How about the attached?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
From 0389911da7b2af708d518423e2c5cacebc4d5f31 Mon Sep 17 00:00:00 2001
From: Kyotaro Horiguchi <horikyoga.ntt@gmail.com>
Date: Wed, 27 May 2020 10:42:24 +0900
Subject: [PATCH v2] Change some comments in postgresql.conf.sample

Fix a lame comment for max_slot_wal_keep_size so that it suggests the
unit for the value.  On the way fixing that, fixed another instacne of
unit symbol (kB) used as unit name to its unit name (kilobytes).
---
 src/backend/utils/misc/postgresql.conf.sample | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 995b6ca155..81055edde7 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -149,7 +149,7 @@
 # - Disk -
 
 #temp_file_limit = -1            # limits per-process temp file space
-                    # in kB, or -1 for no limit
+                    # in kilobytes, or -1 for no limit
 
 # - Kernel Resources -
 
@@ -289,7 +289,7 @@
 #max_wal_senders = 10        # max number of walsender processes
                 # (change requires restart)
 #wal_keep_segments = 0        # in logfile segments; 0 disables
-#max_slot_wal_keep_size = -1    # measured in bytes; -1 disables
+#max_slot_wal_keep_size = -1    # in megabytes; -1 disables
 #wal_sender_timeout = 60s    # in milliseconds; 0 disables
 
 #max_replication_slots = 10    # max number of replication slots
-- 
2.18.2


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: race condition when writing pg_control
Next
From: Amit Langote
Date:
Subject: Re: Getting ERROR with FOR UPDATE/SHARE for partitioned table.