I have an ongoing discussion with the support of one of the cloud services. The problem is that we get "Cannot allocate memory" errors (for allocating shared memory segments by PostgreSQL) despite their "Freeable Memory" and "Free Swap" metrics showing large amounts of available memory.
The support claims that it's because the shared/buffers memory (IO cache) is in "active state so it could not be directly deallocated" and that the reassignment of the memory from the buffers to the application isn't instant and that it takes some time.
To my knowledge, this is not true, as the Linux kernel is always able to instantly reassign memory from I/O cache to an application. Am I right?