Skip to main content

Migrating PostgreSQL 11 to 16 (Windows)

PostgreSQL 16 is supported starting with Informer 5.8.6 and required as of Informer 5.9. When upgrading from a version before 5.8.6 that is not yet on PostgreSQL 16, the upgrade installer handles the bulk of this migration. For help, contact Support at i5support@entrinsik.com or schedule time via the Informer install Calendly.

What happens during the migration

  1. Configure a PGPASS file.
  2. Install PostgreSQL 16.
  3. Back up the PostgreSQL 11 databases.
  4. Restore the databases into PostgreSQL 16.
  5. Configure Informer to use PostgreSQL 16.
  6. Start Informer and apply the final migrations.

You only need to act on two parts: configuring the PGPASS file (so the installer can back up the databases automatically), and updating the Informer configuration to use the PostgreSQL 16 port.

Configure a PGPASS file

  1. Create a file named pgpass.conf in this directory on your PostgreSQL server (usually the same server as Informer), creating the directory if it does not exist. Replace <current_user> with the logged-in user:

    C:\Users\<current_user>\AppData\Roaming\postgresql
  2. The file lets PostgreSQL commands run without prompting for input. Each line uses this syntax:

    <hostname>:<port>:<database>:<username>:<password>

    For a default installation, the contents are:

    127.0.0.1:5432:*:postgres:informer5
    127.0.0.1:5433:*:postgres:informer5
  3. If your installation uses a different port, username, or password, update pgpass.conf accordingly. Find these values in the config.json at the root of the Informer install.

    Escaping colons

    If the PostgreSQL password contains a colon (:), escape it with a backslash (\:) in the PGPASS file.

For full details, see the PostgreSQL PGPASSFILE documentation.

Install PostgreSQL 16

The Informer installer launches the PostgreSQL 16 installer automatically. Leave the installer settings at their defaults. When it asks for the password to the default postgres account, use the same password as PostgreSQL 11 (by default informer5; confirm it in config.json).

If PostgreSQL 11 is on the default port 5432, PostgreSQL 16 is assigned the next available port, 5433. Keep PostgreSQL 11 running so this port is assigned automatically.

Back up and restore the databases

After PostgreSQL 16 is installed, the Informer Migrate database component runs. It first backs up the PostgreSQL 11 databases, then restores them into PostgreSQL 16. Each step can take a few minutes depending on size. The restore opens a new command-shell window, and a pop-up confirms when the migration completes.

Configure Informer to use PostgreSQL 16

Once PostgreSQL 16 has the data, you can safely disable the PostgreSQL 11 service: in the Windows Services Manager, set the PostgreSQL 11 service startup type to Disabled.

Then point Informer at PostgreSQL 16. Edit config.json and change the database port to the PostgreSQL 16 port (by default 5433):

"db": {
"database": "informer5",
"host": "localhost",
"user": "postgres",
"password": "informer5",
"port": 5433
}

Save the changes and start the PostgreSQL 16 service.

Start Informer and apply final migrations

With PostgreSQL 16 running and Informer pointed at it, continue the rest of the 5.8.6 upgrade. When it finishes, Informer restarts and applies a few automatic migration steps, which can take a few minutes. Launching Informer manually with informer run in an elevated PowerShell gives you a rolling view of the startup to monitor it.

Clean up the environment PATH

Once you are running on PostgreSQL 16, raise the PostgreSQL 16 entry in the server's PATH environment variable above the legacy PostgreSQL 11 entry, or remove the PostgreSQL 11 entry entirely.