sort_mem is an alias for the server configuration parameter
work_mem. Beginning with PostgreSQL 8.0,
sort_mem was replaced by
work_mem (commit 391c3811) as it controls not only the amount of memory used by sort internal operations but also hash tables. It has been retained as an alias for backwards compatibility but is no longer documented.