applied Stephen Frost's rls changes.
proposed fix for segmentation fault in pg_dump.