Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012

    Unanswered: Move the postgres database from Drive C to Map Network Drive (Called Z)


    I have a huge Postgres database on my C drive, I will continuously collect the data, so unfortunately, the drive is getting full and I wanted to move it to a map network drive I got. I followed the instruction in the link below:

    Vircom inc.

    1 - Stop the Postgres and Modus Monitor services
    TIP: save a step & stop both services directly from Administrative Tools > Services panel on your Windows server

    2 - Copy C:\Program Files\PostgreSQL\data\*.* to the destination directory (ex. D:\pgdata\)

    3 - Open the Registry Editor

    4 - Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic es\pgsql-8.0

    - Modify ImagePath:

    From: C:\Program Files\PostgreSQL\bin\pg_ctl.exe" runservice -N "pgsql-8.0" -D "C:\Program Files\PostgreSQL\data\"

    To: C:\Program Files\PostgreSQL\bin\pg_ctl.exe" runservice -N "pgsql-8.0" -D "d:\pgdata\" (where d:\pgdata = your new PostgreSQL directory)

    5 - Go to HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Installatio ns

    - Look for and open the alpha-numeric subfolder

    - Modify Data Directory:

    From: C:\Program Files\PostgreSQL\data\

    To: D:\pgdata\ (where d:\pgdata = your new PostgreSQL directory)

    6 - Go to HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\pg sql-8.0

    - Modify Data Directory:

    From: C:\Program Files\PostgreSQL\data\

    To: D:\pgdata\ (where d:\pgdata = your new PostgreSQL directory)

    IMPORTANT: By default, Modus installs PostgreSQL to run under a user called Postgres. The data directory requires proper permissions in order to allow the service to have access.

    7 - Open Windows Explorer

    - Go to the new PostgreSQL data directory in Windows Explorer
    - Right-click and select Properties
    - Click on the Security
    - Click on Add to add the Postgres user
    - Give the Postgres user the permission to Modify the directory

    8 - Start the PostgreSQL and Modus Monitor services from the Administrative Tools > Services panel on your server

    But after doing all the things mentioned in the link, when I want to start the postgres again as a service, it can not be started, it seems it does not recognize the map network drive , would you please let me know if I am in the right track or I need to do something else? any help is appreciated. Thanks.


  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    Does the MODUS software use a tablespace other than pg_default? If so, you'll probably need to change this as well.

    Before you do so, jump over to, and post your question there. I would be curious as to how the developers of PostgreSQL respond to the modus instructions.

    Note - On another subject, I'd also be concerned about database performance, if you simply move everything to a mapped network drive...
    Last edited by loquin; 05-15-12 at 20:11.
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts