This method moves the database data storage location, but not the whole database. This means that the database configuration, logs, transaction logs etc are still stored in the VPOP3\pgsql\data folder, but the actual database tables & indexes are stored in the new location. This may be simpler, but, depending on your requirements, moving the entire database may be better.
In technical terms, this method uses PostgreSQL 'Tablespaces'
To do this:
pgsql\bin\psql -U postgres -p 5433 vpop3
(for version 5 or later. If you are using version 3 or 4, omit the -p 5433
). The default password here is 'pgsqlpass'CREATE TABLESPACE vpop3ts OWNER vpop3 LOCATION 'd:\vpop3data';
(use the appropriate folder name here)ALTER DATABASE vpop3 SET TABLESPACE vpop3ts;
\q
to leave the psql command prompt