I have upgraded postgres 9 to 12 with pgdump and restore it to new database. All seems to be ok. Afterwards I noticed, that size of ../12/main/ has grown a lot and most of it is in pg_wal-directory. Size of ./base is 27GB and size of ./pg_wal is 61GB. On postgres 9 values were 31GB / 1GB (pg_xlog).
After some checking, postgres.conf-file shows default values as:
# max_wal_size = 64GB
min_wal_size = 5GB
I change value of max_wal_size to 4GB and removed comment
SHOW ALL;
told
max_wal_size | 4GB
But size of pg_wal stays on 61GB. Is there some other parameter, I should change?