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.