Re: Fix documentation for max_wal_size and min_wal_size
At Mon, 24 Apr 2023 10:57:56 +0900 (JST), Kyotaro Horiguchi wrote in > So, to clarify the situation, I would phrase it like this: > > The default size is 80MB. Note that if you have changed the WAL > segment size from the default of 16MB with the initdb option > --wal-segsize, the tool should have added the settings with the values > equal to five times the specified segment size to the configuration > file. > > It might be a bit wordy, though.. Or would the following work? The default size is 80MB. Note that initdb may have added the setting for this value if you have specified the WAL segment size when running the tool. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Re: Fix documentation for max_wal_size and min_wal_size
On 2023/04/22 17:39, Michael Paquier wrote: On Tue, Apr 18, 2023 at 01:46:21AM -0700, sirisha chamarthi wrote: "The default size is 80MB. However, if you have changed the WAL segment size from the default of 16MB with the initdb option --wal-segsize, it will be five times the segment size." Yes, I think that something close to that would be OK. Do others have any comments or extra ideas to offer? If the WAL segment size is changed from the default value of 16MB during initdb, the value of min_wal_size in postgresql.conf is set to five times the new segment size by initdb. However, pg_settings.boot_val (the value of min_wal_size used when the parameter is not otherwise set) is still 80MB. So if pg_settings.boot_val should be documented as the default value, the current description seems OK. Or we can clarify that the default value of min_wal_size is 80MB, but when initdb is run with a non-default segment size, the value in postgresql.conf is changed to five times the new segment size? This will help users better understand the behavior of the setting and how it is affected by changes made during initdb. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Re: Fix documentation for max_wal_size and min_wal_size
On Tue, Apr 18, 2023 at 01:46:21AM -0700, sirisha chamarthi wrote: > "The default size is 80MB. However, if you have changed the WAL segment size > from the default of 16MB with the initdb option --wal-segsize, it will be > five times the segment size." Yes, I think that something close to that would be OK. Do others have any comments or extra ideas to offer? -- Michael signature.asc Description: PGP signature
Re: Fix documentation for max_wal_size and min_wal_size
Hi On Mon, Apr 17, 2023 at 9:38 PM Michael Paquier wrote: > On Mon, Apr 17, 2023 at 07:57:58PM -0700, sirisha chamarthi wrote: > > On Fri, Apr 14, 2023 at 1:01 AM Kyotaro Horiguchi < > horikyota@gmail.com> > > wrote: > >> So, I personally think it should be written like this: "The default > >> size is 80MB. However, if you have changed the WAL segment size from > >> the default of 16MB, it will be five times the segment size.", but I'm > >> not sure what the others think about this.. > > Yes, I was under the impression that this should mention 16MB, but > I'd also add a note about initdb when a non-default value is specified > for the segment size. > How about the text below? "The default size is 80MB. However, if you have changed the WAL segment size from the default of 16MB with the initdb option --wal-segsize, it will be five times the segment size."
Re: Fix documentation for max_wal_size and min_wal_size
On Mon, Apr 17, 2023 at 07:57:58PM -0700, sirisha chamarthi wrote: > On Fri, Apr 14, 2023 at 1:01 AM Kyotaro Horiguchi > wrote: >> So, I personally think it should be written like this: "The default >> size is 80MB. However, if you have changed the WAL segment size from >> the default of 16MB, it will be five times the segment size.", but I'm >> not sure what the others think about this.. Yes, I was under the impression that this should mention 16MB, but I'd also add a note about initdb when a non-default value is specified for the segment size. -- Michael signature.asc Description: PGP signature
Re: Fix documentation for max_wal_size and min_wal_size
Hi, On Fri, Apr 14, 2023 at 1:01 AM Kyotaro Horiguchi wrote: > At Thu, 13 Apr 2023 12:01:04 -0700, sirisha chamarthi < > sirichamarth...@gmail.com> wrote in > > The documentation [1] says max_wal_size and min_wal_size defaults are 1GB > > and 80 MB respectively. However, these are configured based on the > > wal_segment_size and documentation is not clear about it. Attached a > patch > > to fix the documentation. > > > > [1] https://www.postgresql.org/docs/devel/runtime-config-wal.html > > Good catch! Now wal_segment_size is easily changed. > > -The default is 1 GB. > +The default value is configured to maximum of 64 times the > wal_segment_size or 1 GB. > -The default is 80 MB. > +The default value is configured to maximum of 5 times the > wal_segment_size or 80 MB. > > However, I believe that most users don't change the WAL segment size, > so the primary information is that the default sizes are 1GB and 80MB. > > So, I personally think it should be written like this: "The default > size is 80MB. However, if you have changed the WAL segment size from > the default of 16MB, it will be five times the segment size.", but I'm > not sure what the others think about this.. This looks good to me. Thanks, Sirisha
Re: Fix documentation for max_wal_size and min_wal_size
At Thu, 13 Apr 2023 12:01:04 -0700, sirisha chamarthi wrote in > The documentation [1] says max_wal_size and min_wal_size defaults are 1GB > and 80 MB respectively. However, these are configured based on the > wal_segment_size and documentation is not clear about it. Attached a patch > to fix the documentation. > > [1] https://www.postgresql.org/docs/devel/runtime-config-wal.html Good catch! Now wal_segment_size is easily changed. -The default is 1 GB. +The default value is configured to maximum of 64 times the wal_segment_size or 1 GB. -The default is 80 MB. +The default value is configured to maximum of 5 times the wal_segment_size or 80 MB. However, I believe that most users don't change the WAL segment size, so the primary information is that the default sizes are 1GB and 80MB. So, I personally think it should be written like this: "The default size is 80MB. However, if you have changed the WAL segment size from the default of 16MB, it will be five times the segment size.", but I'm not sure what the others think about this.. regards. -- Kyotaro Horiguchi NTT Open Source Software Center