Add PostgreSQL startup and shutdown functions