PostgreSQL causing slow shutdowns with OS X Server in Mavericks I've found that on OS X Server in Mavericks, the PostgreSQL processes are causing shutdown delays. During a verbose shutdown, I get the following (shortened) output:

com.apple.launchd                      System: Still alive with 1/7 (normal/anonymous) children.
*.anonymous.pg_receivexlog             PID is still valid
*.anonymous.postgres_real              PID is still valid
*.anonymous.postgres_real              PID is still valid
*.anonymous.Python                     PID is still valid
*.anonymous.pg_receivexlog             PID is still valid
*.anonymous.postgres_real              PID is still valid
com.apple.DeviceManagement.postgres    PID is still valid


The (*) is replaced by a random string, different for each item.

I have no experience with PostgreSQL and I don't use any of the database-related OS X Server components (mainly Xcode and VPN) so I have no idea where to start.
The com.apple.DeviceManagement.postgres line makes me think that this could be related to Profile Manager services. Does it show Profile Manager running in Server.app? If you're not utilizing this service, disabling it may help to stop the shutdown delays.

Alternately, if you need to keep these services running, it may be worth looking at some log files somewhere (/var/log/system.log or /var/log/devicemgr/*?) to see if the profile manager service (or any others) are complaining.