PostgreSQL Multiple Instances
This guide outlines the procedures for identifying, deploying, and upgrading PostgreSQL database instances using integrated scanner mechanisms and automated workflows.
Scanner Process
For running the scans on all software versions, refer to BigFix Scanner for Middleware Application. These results are then used by the PostgreSQL patching tasks to determine which instances require updates.
Mandatory Pre-Patching Prerequisites
- Service Downtime: PostgreSQL files cannot be updated while the database server is running. You must stop the Windows Service or the Linux daemon before patching.
- Compilation Tools: For Linux, the environment requires gcc (or
an equivalent C compiler), GNU make, readline (for
psqlcommand-line editing), and zlib (for compression support) to compile source code into executable binaries. - Third-Party Dependencies: For Linux, additional features enabled during initial configuration may require optional modules and packages like openssl, libxml2, libxslt, bison, and flex. Users must ensure all required dependency libraries are installed and accessible so the patching script can verify them.
Patching Process
The PostgreSQL patching task uses the scanner results to identify lower minor versions and update them to the patch version specified in the task.
- Select the applicable computer in the BigFix Console to review installed PostgreSQL versions.
- When the action is executed on the endpoint, the patching task reads the
results.xmlfile and identifies all PostgreSQL instances present on the system. - For each detected instance, distinct Makefiles are utilized or generated in
the
middleware/postgresqldirectory. - For Windows: All outdated or lower versions of PostgreSQL are updated in a
single execution. Verify that no background engine processes
(
postgres.exe) are running if the patching process fails. - For Linux: The source code binaries of the patching version is downloaded
and extracted in the
middleware/postgresqldirectory.
The upgrade process follows a structured sequence to ensure minimal downtime and configuration integrity.
Building and Installing Binaries
The task involves executing the configuration prior to building the binaries.
configure (with custom path and the build options),
make, and make install commands from within
the extracted folder middleware/postgresql/<version>. After a
successful installation, the user needs to run make distclean.
Repeat the above process for each of the detected instances (custom path) in the
mw_results.xml file.Exit codes and their meanings
| Exit code | Action |
|---|---|
| Exit Code 11: Patching of one or more instances failed |
|
| Exit Code 13: Archive file not found |
|
| Exit Code 14: Extraction of the archive failed |
|