Hi Found one more place needed to be changed(long -> int64).
Also changed the output for int64 data(Debug mode on & define EXEC_SORTDEBUG ) And, maybe there's a typo in " src\backend\executor\nodeIncrementalSort.c" as below. Obviously, the ">=" is meaningless, right? - SO1_printf("Sorting presorted prefix tuplesort with >= %ld tuples\n", nTuples); + SO1_printf("Sorting presorted prefix tuplesort with %ld tuples\n", nTuples); Please take a check at the attached patch file. Previous disscution: https://www.postgresql.org/message-id/CAApHDvpky%2BUhof8mryPf5i%3D6e6fib2dxHqBrhp0Qhu0NeBhLJw%40mail.gmail.com Best regards Tang
0001-Use-int64-instead-of-long-for-space-used-variables-a.patch
Description: 0001-Use-int64-instead-of-long-for-space-used-variables-a.patch