Developer's Guide to PostgreSQL on Linux: Changing the Default Data Directory | The Coding Interface
In this fifth article demonstrates how to change the default data directory of a PostgreSQL database cluster running on the Linux Ubuntu 18 LTS and Centos 7 operating systems. This article shifts focus to improving the scalability, robustness and, performance made possible by moving the data directory to it's own area of the file system. Isolating the data directory also reduces file access contention with other OS activities and allows for easier resizing.
thecodinginterface.com