From PostgreSQL 9.x Security Technical Implementation Guide
Part of SRG-APP-000380-DB-000360
Associated with: CCI-001813
Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system.
To list all the permissions of individual roles, as the database administrator (shown here as "postgres"), run the following SQL: $ sudo su - postgres $ psql -c "\du If any role has SUPERUSER that should not, this is a finding. Next, list all the permissions of databases and schemas by running the following SQL: $ sudo su - postgres $ psql -c "\l" $ psql -c "\dn+" If any database or schema has update ("W") or create ("C") privileges and should not, this is a finding.
Configure PostgreSQL to enforce access restrictions associated with changes to the configuration of PostgreSQL or database(s). 
Use ALTER ROLE to remove accesses from roles: 
$ psql -c "ALTER ROLE  
	Lavender hyperlinks in small type off to the right (of CSS
	class  
	You can obtain data about documents and items in other
	formats. Simply provide an HTTP header  Powered by sagemincer FROM 
Pro Tips
    id, if you view the page source) point to
	globally unique URIs for each document and item. Copy the
	link location and paste anywhere you need to talk
	unambiguously about these things.
	
      Accept:
	text/turtle or
	Accept: application/rdf+xml.