I was reconfiguring defaults for postgres configurations, when I got this error:
ERROR: 4 is outside the valid range for parameter “work_mem” (64 .. 2097151)
I thought that was pretty weird, since the default value is 4 and every guide and documentation all shows that you can even set kilobytes. SO why was I getting this error?
Turns out that I had made the very simple mistake of not specifying what type of value I wanted= I had to write
4MB instead of
4 . Changing this immediately resolved the issue.