The shortest path routing is one of the well-known network analysis techniques implemented in road management systems. Pg routing as an extension of Postgre SQL/Post GIS database is an open source library that implements the Dijkstra shortest path algorithm. However, the functionality to avoid obstacles in that analysis is still limited. Therefore, this paper was conducted to enable obstacle avoidance function in the existing pg routing algorithm using open street map road network. By implementing this function, it enhances the Dijkstra algorithm ability in network analysis.