The following information is based on our experience downloading PostgreSQL 14.4 from the Enterprise DB website and installing it on a Windows 10 machine. This was done in early June 2022.
The URL is: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
The site starts by asking which version of PostgreSQL you want and the operating system of the machine you're downloading to. AACT is currently running on PostgreSQL version 11.5, so versions subsequent to that should work. For this demo, we chose version 14.4.
We googled to find these instructions about determining if your machine is 32 or 64 bit:
When we did this, we determined our machine to be 64 bit (see the value for 'System type:' in the screenshot below). Therefore we selected Windows x86-64 from the dropdown.
Go to where your downloads are and [click] on the installation for PostgreSQL.
Choose [Yes] when it asks if you allow the app to make changes to your device.
This will fire off the setup wizard. Click [ Next > ] buttons (accepting all defaults) until it prompts you for the superuser password. Enter a password you will remember! You'll need it later to access PostgreSql & create the AACT database.
You should see a progress bar showing that it is installing PostgreSQL
Unless you intend to develop an application or additional functionality that uses PostgreSQL databases, you will not need to install additional PostgreSQL features/utilitites, so exit when it completes the main installation.
You can use pgAdmin to create and populate local database instances. Left click the Windows icon in the lower left and scroll down the list of icons until you see to PostgreSQL icon. Click on it to expand the list of PostgreSQL tools and click on pgAdmin 4.
When you click pgAdmin 4, it will launch the tool that allows you to create a local version of the AACT database and populate it from a static copy that's available from the AACT website. (pgAdmin is also a great tool for querying the database once it's populated.) The window it presents should look something like this:
In the left pane, double-click on Servers and navigate down to Databases. Once there, click on [Objects] from the menu across the top of the page, and select Create and then Database....
This should present an input dialog box that allows you to define a new database. Enter the database name: 'AACT' in the first input box, and before you press [Save], click the Security tab.
Click the little plus icon to the right of 'Privileges' and then under 'Grantee' select PUBLIC from the drop down and assign it All Privileges by clicking in the 'Privileges' cell next to PUBLIC and checking the box next to 'All'.
Now you can press [Save].
You need to create a specific database user/role to import data from AACT. This is because all database objects in the AACT dump file (the file which will be used to populate your local instance of AACT) are owned by a user named ctti. If the role doesn't exist, you will get error messages that look something like:
(We intend to modify the database dump process to avoid the need for you to create a database user/role named ctti, but for now, it's necessary.)
In the left pane, select PostgreSQL 14.4 and then select Object - Create - Login/Group Role.
In the 'Create - Login/Group Role' dialog that pops up, enter ctti in the Name input field.
Then select the 'Privileges' tab at the top of the dialog and set 'Can Login?' to 'Yes'.
Then press [Save]
You need to create a specific database user/role to import data from AACT. This is because all database objects in the AACT dump file (the file which will be used to populate your local instance of AACT) are owned by a user named read_only. If the role doesn't exist, you will get error messages that look something like:
Repeat the same steps as you did for ctti database role
Download a static copy of the AACT database from the AACT Download Page, and unzip the resulting zip file. It will unpack a set of files that include documentation and a dump file of the AACT database. The file you need for populating your local database copy is postgres_data.dmp.
You can populate the database using the following command:
> C:\Program Files\PostgreSQL\14.4\bin\pg_restore.exe --host "127.0.0.1" --port "5432" --username "postgres" --no-password --role "ctti" --dbname "aact" --verbose "C:\\<directory containing downloaded file>\\postgres_data.dmp"
Alternatively, you can take the following steps to populate the database using the pgAdmin tool.
You can import the content of postgres_data.dmp file into your new database by selecting the AACT database in the left pane and then clicking [Tools] in the top menu bar of pgAdmin and then click Restore... in the dropdown menu.
You'll need to click the ellipses to the right of the Filename input box. This will present a 'Select file' dialog box.
Navigate to the directory where the postgres_data.dmp file has been downloaded to your machine. Before you can do this though, you must select 'All Files' in the dropdown that appears in the lower right corner. The postgres_data.dmp file will not display unless 'All files' is selected.
Double click on postgres_data.dmp. You'll return to the 'Restore (Database: AACT)' dialog box where you can press [Restore] to initiate the process that will import the contents of the dump file into the new AACT database.
The process will take several minutes. While it's loading, the following message will display: