Per discussion on -hackers, the attached patch introduces an optional
parameter to pg_dumpall's -g (--globals-only) option to allow roles or
tablespaces to be dumped on their own.
eg.
pg_dumpall -g -- Dump roles and tablespaces per current behaviour
pg_dumpall -gr -- Dump roles only (or users and groups)
pg_dumpall -gt -- Dump tablespaces only
Regards, Dave.