top of page

Set Path Environment Variable

Deploy and Configure Qlik Sense

Overview

In this lesson, you will learn how to configure Path environment variable to point to PostgreSQL bin folder in order to simplify writing and managing scripts to backup PostgreSQL server.

What is Path Environment Variable?

Jacob Bolda does a great job explaining what Path environment variable is in this YouTube short. His simple and precise explanation of path variable is:

PATH tells the shell (a.k.a. the Command Prompt or PowerShell) where to find executables.

How Path Variable Applies to Qlik Sense Server

In our case, we will be running psql command to configure PostgreSQL for Qlik Sense. And, later on in your Qlik Sense admin career, you will need to run commands like:

  • pg_dumpall to backup PostgreSQL server

  • pg_upgrade to upgrade PostgreSQL server

  • psql to recover PostgreSQL server from backups

We’ll be running these and other PostgreSQL commands in PowerShell and Command Prompt.

Example

By default, the executables for PostgreSQL commands in a standalone installation of PostgreSQL are located in a directory like this:

Without setting a Path variable to point to the directories where PostgreSQL binaries or executables are stored, you would need to write a command like this to run the psql command, for example:

However, with Path variable specified, you will be able to run the same command like this:

Benefits of Using Path Variable

Having path to PostgreSQL executables specified in the Path environment variable will make scripts shorter and easier to write, read, and manage which, ultimately, will save you a bunch of time and effort in your server admin career. With that said, let’s get started and specify the path to PostgreSQL bin folder on your server in Path environment variable.

14

STEPS

11

SCREENSHOTS

LOW

COMPLEXITY

Step 01.

Open Windows Explorer and go to PostgreSQL installation directory and look for the bin folder.

Step 02.

Open the bin folder.

Step 03.

Right-click the address bar and select the Copy address option to copy the path to bin directory.

Step 04.

Go to This PC in Navigation pane.

Step 05.

In the Computer tab, click on the System properties button.

Step 06.

Click the Advanced system settings link in the list of Related settings links.

Step 07.

In the System Properties window, click the Environment Variables… button.

Step 08.

In the System variables section, select the Path variable.

Step 09.

Click the Edit… button.

Step 10.

Click the New button to add a path to PostgreSQL bin folder to list of paths stored in Path environment variable.

Step 11.

Paste the path to PostgreSQL bin directory that you’ve copied in step 03 above.

Step 12.

Click the OK button to save changes to Path environment variable.

Step 13.

Click the OK button in the Environment variables window.

Step 14.

Click the OK button in the System Properties window.


Guide

Summary

All Set!

Easy as that. All we did here is essentially tell the server where to find PostgreSQL's executables so that we could write shorter and more manageable commands and scripts for PostgreSQL server administration.

Next and last step to get PostgreSQL ready for hosting Qlik Sense is to create a user and a handful of databases that Qlik Sense needs. Steps showing how to get that done are covered in the next lesson. I'll see you there!

what is the PATH environment variable?

YOUTUBE VIDEO

Short and clear explanation of what the PATH environment variable is.

References

Up Next

Configure Standalone PostgreSQL

Copyright © 2023 howdash LLC

Guides

Enroll

01. Installation and Initial Setup

01. Installation and Initial Setup

01. Installation and Initial Setup

Install Standalone PostgreSQL

01. Installation and Initial Setup

Set Path Environment Variable

01. Installation and Initial Setup

01. Installation and Initial Setup

01. Installation and Initial Setup

Install Qlik Sense Server with Bundled PostgreSQL

01. Installation and Initial Setup

02. Configuration

02. Configuration

02. Configuration

02. Configuration

02. Configuration

02. Configuration

02. Configuration

02. Configuration

03. Server Security

03. Server Security

03. Server Security

03. Server Security

03. Server Security

03. Server Security

03. Server Security

bottom of page