PostgreSQL, often simply called Postgres for short, is a popular open source DBMS package. This topic is the second step in a five topic sequence showing a complete installation of PostgreSQL from the very beginning, including the PostGIS extension required for GIS use. Please see the Install PostgreSQL topic for basic info on PostgreSQL.
Disclaimer: These topics were accurate when written, using the versions of installation software indicated. Third party packages can and do change, so this topic may be out-of-date. It is provided as an example of how such installations can be approached.
Installing PostgreSQL and readying it for use in typical installations involves five steps:
Open a Firewall Port for PostgreSQL
Enable Network Access to PostgreSQL
Configure PostGIS in PostgreSQL
This is the second topic in the above sequence of steps.
In this topic, we are using a 64-bit Windows 10 system to which we have connected via Remote Desktop (RDP). This entire topic was conducted on that machine via RDP.
If we have Manifold installed on the same computer on which we install PostgreSQL, and if we will always use our PostgreSQL installation from the same computer, we can skip this step. For example, if we are an individual user with only one computer and we do everything on that one computer, we can always connect to PostgreSQL from Manifold using a localhost designation, that is, not going through any network.
We only need to do this procedure if we want to access this PostgreSQL installation through the network from other computers. For example, if we work in an organization with several computers and one of them hosts this PostgreSQL installation but we actually do our Manifold work on a different computer, to connect from our desktop computer to the machine hosting PostgreSQL we have to be able to connect to it through the web.
Microsoft's Windows Defender Firewall will prevent connections through the network to PostgreSQL, so we must first configure the firewall to allow connections, and then (next topic) we must configure PostgreSQL to accept such connections. That is easy to do.
We will allow connections through port 5432, the default port for PostgreSQL, which we accepted as the port to use during our work in the Install PostgreSQL topic. We can use a similar procedure to open a port through the firewall for any other database, such as SQL Server, for which we might want to allow connections through the Windows firewall.
Launch Windows Control Pane, the full version. That is easiest to do by entering Windows Control Pane in the Windows taskbar search box for launching commands.
Choose Windows Defender Firewall. When the app launches, click on Advanced Settings in the left hand stack of choices.
Click on Inbound Rules. in the left hand pane. The illustration above appears. Click on New Rule.
Choose Port and click Next.
Enter 5432 and click Next. That is the default port for PostgreSQL, which we accepted as the port to use during our work in the Install PostgreSQL topic.
Choose Allow the connection and click Next.
Leave all check boxes checked. Click Next.
Enter Postgres, or some other suitably descriptive name which will remind us what this rule does, and click Finish.
Done. We can now close the dialogs by clicking the X buttons in the upper right corners.
We have opened a firewall port to stop Windows from blocking access to PostgreSQL from the network. Next, we enable network access within PostgreSQL.
Continue this case study on installing PostgreSQL with the Enable Network Access to PostgreSQL topic.
Jump to the beginning of the case study: Install PostgreSQL
File - Create - New Data Source
Enable Network Access to PostgreSQL
Configure PostGIS in PostgreSQL
Big List of Formats and Data Sources
Example: Switching between Manifold and Native Query Engines