On 19 August 2015 at 12:38, Tom Lane <t...@sss.pgh.pa.us> wrote: > David Rowley <david.row...@2ndquadrant.com> writes: > > david=# set work_mem = '94GB'; > > ERROR: 98566144 is outside the valid range for parameter "work_mem" (64 > .. > > 2097151) > > Apparently you're testing on a 32-bit server. 64-bit servers allow > work_mem to go up to INT_MAX kilobytes. >
hmm, no, but it does appear that sizeof(long) is 4 bytes for me, despite 64 bit OS. I guess this accounts for my misunderstanding that work_mem was limited to 2GB even on 64 bit machines. >From guc.h #if SIZEOF_SIZE_T > 4 && SIZEOF_LONG > 4 #define MAX_KILOBYTES INT_MAX #else #define MAX_KILOBYTES (INT_MAX / 1024) #endif Apologies for the noise.