How to move a PostgresSQL/ PostGIS to another drive
There are two things:


the software directory containing the binaries like postgres and related files
the data directory that you can find with the SQL statement

SHOW data_directory;



On Debian Linux the configuration files are in a separate location, but since you are speaking about "drive letters", you are probably using Windows, where the configuration files are usually in the data directory.

You can simply copy the software directory and the data directory to your external disk after you have stopped PostgreSQL.

You can start the server with

&lt;software directory&gt;\bin\pg_ctl start -D &lt;data directory&gt;




If you want to start PostgreSQL through a Windows service, you may want to delete and re-create the service:

Delete the existing service:

&lt;software directory&gt;\bin\pg_ctl.exe unregister -N postgresql-11


The exact name to use for this, depends on your installation. You need to look it up in the "Services" management console (right click on the service, then choose "Properties" - make sure you close that dialog before proceeding). Once the old service is removed, create a new one  pointing to the new data directory:

&lt;software directory&gt;\bin\pg_ctl.exe register -N postgresql-11 -D &lt;data directory&gt; -S auto


Make sure you enclose the data directory in double quotes if it contains spaces.