I tried to look into pg docs, but I can't find a clear statement mentioned what will be the unit value in pg_setting view for max_wal_size.
In pg 9.5, I have:
name | setting | unit | category | short_desc | extra_desc | context | vartype | source
--------------+---------+------+-------------------------------+-----------------------------------------------+------------+---------+---------+-----------------
max_wal_size | 64 | NULL | Write-Ahead Log / Checkpoints | Sets the WAL size that triggers a checkpoint. | NULL | sighup | integer | configuration fi
(1 row)
[public] # show max_wal_size ;
max_wal_size
--------------
1GB
in pg10.3, I have:
name | setting | unit | category | short_desc | extra_desc | context | vartype | source
--------------+---------+------+-------------------------------+-----------------------------------------------+------------+---------+---------+-----------------
max_wal_size | 1024 | MB | Write-Ahead Log / Checkpoints | Sets the WAL size that triggers a checkpoint. | NULL | sighup | integer | configuration fi
(1 row)
[public] # show max_wal_size ;
max_wal_size
--------------
1GB
(1 row)
I think it's mentioned in this link: https://www.postgresql.org/message-id/11310.1475523980%40sss.pgh.pa.us, the reason why the unit value is 16MB in 9.5(a bug?), but it is going to be always MB going forward?
Thanks.