Adaptive and Scalable Database Management with Machine Learning Integration: A PostgreSQL Case Study | Synapse