Respect the max shared mem lists for postgresql.  Issue #597
Merge branch 'jm/597' PR #598

Respect shared mem limits