15.7. Adaptive work_mem

When executing SQL, if the number of rows used for sorting or hash tables exceeds one million, work_mem will be automatically adjusted to 1GB if it is less than 1GB.