Determine whether you need a new order for PostgreSQL 15 on SAS® Viya® 3.5 (Linux)


PostgreSQL 15 is available on SAS Viya 3.5 starting with the 23w44 revision in November 2023. However, in order to obtain PostgreSQL 15 on SAS Viya 3.5, a new SAS software order is required. All new SAS Viya 3.5 deployments using a SAS software order from 23w44 or later include PostgreSQL 15 by default. Existing SAS Viya 3.5 deployments need to be upgraded to SAS Viya 3.5 using an order from 23w44 or later. 

If you are interested in obtaining PostgreSQL 15 on SAS Viya 3.5 (Linux), complete the following checks to determine how to proceed.

For SAS Viya 3.5 Windows environments see SAS KB0037228, "Determine whether you need a new order for PostgreSQL 15 on SAS® Viya® 3.5 (Windows)."

Confirm your version of SAS Viya

If you are on a release of SAS Viya prior to SAS Viya 3.5, you must upgrade to SAS Viya 3.5 (Ship Event 23w44 or later) in order to obtain PostgreSQL 15.

To upgrade to SAS Viya 3.5, contact SAS to obtain an updated software order for SAS Viya 3.5. Then follow the directions in Upgrading to SAS Viya 3.5 from Earlier Versions of SAS Viya, including the post-Viya upgrade steps for Upgrade to PostgreSQL Version 15, to upgrade to SAS Viya 3.5

If you are already on SAS Viya 3.5, proceed to the next check.

Check whether PostgreSQL 15 is already installed on your system

If SAS already installed PostgreSQL 15, it is located in one of the following locations depending on your operating system. Complete the following steps to determine whether PostgreSQL 15 is already installed:

  1. Refer to the vars.yml for your deployment to determine the target(s) for PostgreSQL. Then determine which machine(s) apply to the target(s).   
    1. If this folder exists on one of the target machines in your SAS Viya deployment, then PostgreSQL 15 is installed: /opt/sas/viya/home/postgresql15.
  2. If you do not have the postgresql15 location, you must upgrade to SAS Viya 3.5 (Ship Event 23w44 or later) in order to obtain PostgreSQL 15 by completing the following steps:
    1. Contact SAS to obtain an updated software order for SAS Viya 3.5.
    2. Follow the directions in Adding SAS Viya Software to a Deployment and Upgrading Products in SAS Viya 3.5, including the post-Viya upgrade steps for Upgrade to PostgreSQL Version 15, to upgrade to the required SAS Viya 3.5 release.

If you have the postgresql15 location, proceed to the next check.

Check whether your deployment is already running with PostgreSQL 15

It is possible to have PostgreSQL 15 installed but not in use with SAS Viya. The following checks determine whether PostgreSQL 15 is in use by SAS Viya.

In the following example, a value of 15 indicates PostgreSQL 15 is running:

$ sudo cat /opt/sas/viya/config/data/sasdatasvrc/postgres/node0/PG_VERSION

-bash-4.2$ sudo cat /opt/sas/viya/config/data/sasdatasvrc/postgres/node0/PG_VERSION
15


In this example, the following indicate PostgreSQL 15 is running: POSTGRES_FULL_VERSION=15.4, PGPOOL_FULL_VERSION=4.4.4. 

$ cd /etc/init.d/
$ sudo service sas-viya-sasdatasvrc-postgres-pgpool0 status

-bash-4.2$ cd /etc/init.d/
-bash-4.2$ sudo service sas-viya-sasdatasvrc-postgres-pgpool0 status
Current Datetime: 2023-10-30 13:09:50.947
Executing user is root
/etc/init.d/sas-viya-sasdatasvrc-postgres-pgpool0 sourcing sds_set_env_variable with /opt/sas/viya/config/etc/sasdatasvrc/postgres/pgpool0/sds_env_var.sh...
  SAS_HOSTNAME=viya35.company.com, SAS_SERVICE_ADDR=viya35.company.com, SAS_BIND_ADDR=0.0.0.0, SAS_BIND_ADDR_CIDR=, SAS_BIND_ADDR_IF=
  VAULT_ADDR: https://viya35.company.com:8200
  SASCONFIG=/opt/sas/viya/config, PGHOME=/opt/sas/viya/home/postgresql15, PGPOOLHOME=/opt/sas/viya/home/pgpool-II44
  POSTGRES_FULL_VERSION=15.4, PGPOOL_FULL_VERSION=4.4.4
Sourced. HA_PGPOOL_COUNT=3, SASCONFIG=/opt/sas/viya/config, SAS_LOG_DIR=/opt/sas/viya/config/var/log
INFO: source: SU set to /usr/sbin/runuser
Checking status of sas-viya-sasdatasvrc-postgres-pgpool0...
PGPool is running with PID=31666


If you are already running with PostgreSQL 15, no further action is needed. 

If you are not running with PostgreSQL 15, proceed to the next check.

Check for the latest RPMs

The latest RPMs must also be installed. Run the following code to check the versions of the RPM:

$ cd /etc/init.d
$ rpm -qa | egrep 'sasdata|sas-postgres|pool'


Depending on where you have the pgpool and postgres nodes in your deployment, the following might occur:

sas-sasdatasvrc-0.8.1-20231004.1696453243483.x86_64
sas-postgresql-secure-libs-15-15.4-20230908.1694198674082.x86_64
sas-pgpoolc-0.7.0-20230908.1694198280781.x86_64
sas-postgresql-secure-15-15.4-20230908.1694198674085.x86_64
sas-pgpool-II-44-4.4.4-20230908.1694201002575.x86_64


The initial value in the output is important. The ending value might change depending on the patches.  

In the following example, a value of sas-sasdatasvrc-0.8.1 or higher is expected:

sas-sasdatasvrc-0.8.1-20231004.1696453243483.x86_64

You can ignore the value following the sas-sasdatasvrc-0.X.X (such as 20231004.1696453243483.x86_64 in the example above).

Note: The above examples are for RHEL. On SUSE and PLX, the latter part of the string might be different.

If you have the versions noted above, PostgreSQL 15 is installed but not yet configured. Complete the post-Viya upgrade steps for Upgrade to PostgreSQL Version 15.

If you do not have the version of the files that are noted above, you must upgrade to SAS Viya 3.5 (Ship Event 23w44 or later) in order to obtain PostgreSQL 15.

To upgrade to SAS Viya 3.5, contact SAS to obtain an updated software order for SAS Viya 3.5. Then, follow the directions in Adding SAS Viya Software to a Deployment and Upgrading Products in SAS Viya 3.5, including the post-Viya upgrade steps for Upgrade to PostgreSQL Version 15, to upgrade to the required SAS Viya 3.5.