NOTE: These instructions only work if Cubit Estimating is the ONLY application that is using the PostgreSQL installation. If ANY other applications use PostgreSQL, these instructions will break the other applications.
*** Check the size of C:\Program Files\Postgresql\10\Data folder size
*** Check that the available disk space at 2.5 to 3 times the size of the C:\Program Files\Postgresql\10\Data folder
*** Warning on the length of time to complete the process:
10GB approx 30min in length for a backup
*** These instructions have been developed to facilitate a version 10 to 12 upgrade; if you have an older version of Postgres, please raise a ticket with our support desk
- Backup database using Cubit Estimating Management Console.
- Stop and disable the old PostgreSQL service.
- Download PostgreSQL version 12.
- Install PostgreSQL 12.
- Remove and recreate the database in Cubit Estimating Management Console.
- Restore the database backup using in Cubit Estimating Management Console.
- Run Cubit Estimating and make sure everything looks OK.
- (Optional) Once you are sure, everything is working OK, uninstall the earlier version of PostgreSQL.
Long Version (with screen captures)
A. Backup database(s) using Cubit Estimating Management Console.
1. If it is a network install, use the desktop icon or start the menu entry.
2. If standalone install, run the “CUBIT Management” or “CUBIT Management.exe” Application in the “C:\Program Files\Buildsoft\Cubit” folder.
Note: You may need admin rights to view this folder.
B. Stop and disable the old PostgreSQL service.
1. In the Windows taskbar search box, type Services.
2. In the search results window, click “Run as administrator”.
3. In the Services window, scroll down to the PostgreSQL service; its name will start with “Postgres-”:
4. Right-click on the PostgreSQL service name and click on Properties.
5. In the Properties window:
- Click the “Stop” button to stop the service.
- Change the Startup type to “Disabled”. (This will keep it from restarting on the next reboot of the computer.)
- Click the “Apply” button and then the “OK” button.
C. Download PostgreSQL version 12.
1. Open https://www.enterprisedb.com/downloads/postgres-postgresql-downloads in a web browser.
2. Click on the button in the “Windows x86-64” column on the “12.nn” row.
NOTE: Do not download version 13.nn or 14.nn – Cubit Estimating is not currently compatible with these versions of PostgreSQL.
The PostgreSQL installer should automatically download. If it doesn’t, follow the instructions on the screen
D. Install PostgreSQL 12.
1. Find the PostgreSQL-12.nn-1-windows-x64.exe file you downloaded in File Explorer and double-click it.
2. In the Setup – PostgreSQL welcome window, click Next.
3. In the Installation Directory window, click Next to accept the Installation Directory.
4. In the Select Components window, click Next to install all components.
5. In the Data Directory window, click Next to accept the default location.
6. In the password window, enter the password p#5tgR3s*p
7. In the Port window, click Next to accept the default of 5432.
8. In the Advanced Options window, click next to accept the Default locale.
9. In the Pre-Installation Summary window, click Next.
10. In the Ready to Install window, click Next to install PostgreSQL 12.
11. In the Completing the PostgreSQL Setup Wizard window, which appears after several minutes, uncheck the Launch Stack Builder check box and click the Finish button.
E. Create a new database in Cubit Estimating Management Console.
1. In Cubit Estimating Management Console, highlight the existing database in the list and click the “Remove” button.
2. Click the “Create” button.
3. Click the "Default" button then fill in the Create Database dialog as shown, based upon whether you are using a standalone install or a default network install:
- Default Standalone install:
Existing database: postgres
Admin account: postgres
Application account: standaloneBuildsoftUser
Confirm password: pass4Buildsoftuser
- Default network install:
Existing database: postgres
Admin account: postgres
Application account: buildsoftuser
Confirm password: Buildsoftuserpassword
Note: For any other network database other than the default one, the database password will be whatever you set it to.
4. Click the Create button.
5. Click the OK button.
6. Click the OK button.
F. Restore the database backup using in Cubit Management Console.
1. In Cubit Management Console, highlight the database name in the grid:
2. Click Configure and change Postgresql path from C:\Program Files\Postgresql\10\bin to C:\Program Files\Postgresql\12\bin.
3. Click OK to return to the Console
4. Click the Restore button.
5. Click the Browse button and select the backup file you created in step 1.
6. Click the Restore button.
7. A dialogue appears, indicating that the attempt to back up the existing database failed – this is expected. Click the Restore button to continue. The backup will now be restored to the upgraded Postgresql 12.
8. Once the restore is complete, click OK in the dialogue box that appears, reporting restore success.
G. Run Cubit Estimating and make sure everything looks OK.
H. (Optional) Once you are sure everything is working OK, uninstall the earlier version of PostgreSQL AND delete Postgresql/10/Data to gain available disk space