Understanding “max_wal_size” and “min_wal_size” parameters default values from postgresql.conf file

Started by otar shavadzeover 9 years ago3 messages
#1otar shavadze
oshavadze@gmail.com

According to documentation, for "min_wal_size" and "max_wal_size" parameters
<https://www.postgresql.org/docs/9.5/static/runtime-config-wal.html&gt;

default values are:

For max_wal_size: The default is 1 GB

For min_wal_size: The default is 80 MB

Then I look this parameters from my database config:

select name, setting, unit from pg_settings where name in
('min_wal_size', 'max_wal_size')

Gives result:

name | setting | unit----------------------------------
max_wal_size | 64 |
min_wal_size | 5 |

I have 2 questions:

1) Why these values doesn't match default values, which are shown in docs?
I never changed config settings at all.

2) Why unit column is empty/NULL for these parameters? What means 64 and 5
values in this case? MB? GB? or what?

Why this is not like for example work_mem parameter, when everything is
clear:

name | setting | unit----------------------------------
work_mem | 4096 | kB

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: otar shavadze (#1)
Re: Understanding “max_wal_size” and “min_wal_size” parameters default values from postgresql.conf file

otar shavadze <oshavadze@gmail.com> writes:

name | setting | unit----------------------------------
max_wal_size | 64 |
min_wal_size | 5 |

I have 2 questions:

1) Why these values doesn't match default values, which are shown in docs?
I never changed config settings at all.

They do match the defaults.

2) Why unit column is empty/NULL for these parameters? What means 64 and 5
values in this case? MB? GB? or what?

The problem seems to be that somebody missed out adding GUC_UNIT_XSEGS
to the switch in GetConfigOptionByNum. It should be showing you
something like "16MB" in the unit column, I think.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3otar shavadze
oshavadze@gmail.com
In reply to: Tom Lane (#2)
Re: [GENERAL] Understanding “max_wal_size” and “min_wal_size” parameters default values from postgresql.conf file

Thank you very much

On Mon, Oct 3, 2016 at 11:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Show quoted text

otar shavadze <oshavadze@gmail.com> writes:

name | setting | unit----------------------------------
max_wal_size | 64 |
min_wal_size | 5 |

I have 2 questions:

1) Why these values doesn't match default values, which are shown in

docs?

I never changed config settings at all.

They do match the defaults.

2) Why unit column is empty/NULL for these parameters? What means 64 and

5

values in this case? MB? GB? or what?

The problem seems to be that somebody missed out adding GUC_UNIT_XSEGS
to the switch in GetConfigOptionByNum. It should be showing you
something like "16MB" in the unit column, I think.

regards, tom lane