This message appears in logs indicating PostgreSQL was properly shut down. When seen as an error, it means attempting to connect to a stopped server.
Impact
Database is unavailable. All connection attempts fail until server is restarted.
Common Causes
- Intentional shutdown for maintenance
- Server stopped by administrator
- System reboot
- Automated shutdown scripts
- Out of memory killer
Troubleshooting and Resolution Steps
Check server status:
sudo systemctl status postgresqlStart PostgreSQL:
sudo systemctl start postgresql # Enable auto-start on boot sudo systemctl enable postgresqlCheck why it stopped:
# Check logs sudo journalctl -u postgresql -n 100 # Check for OOM killer sudo dmesg | grep -i "out of memory"
Additional Information
- Clean shutdown is normal and safe
- Check logs to understand why shutdown occurred
- Configure auto-start for production systems
- Monitor for unexpected shutdowns
Frequently Asked Questions
Q: Is "shut down" message an error?
A: No if intentional. Yes if unexpected - investigate cause.
Q: How do I prevent unexpected shutdowns?
A: Monitor resources, configure proper memory limits, enable auto-start, use process monitoring.