pgd node upgrade v5

Synopsis

The pgd node upgrade command is used to upgrade the PostgreSQL version on a node in the EDB Postgres Distributed cluster.

Syntax

pgd node <NODENAME> upgrade [OPTIONS] --old-bindir <OLD_BINDIR> --new-bindir <NEW_BINDIR> --old-datadir <OLD_DATADIR> --new-datadir <NEW_DATADIR> --database <DATABASE> --username <USERNAME>

Where <GROUPNAME> is the name of the node which you want to upgrade and <OLD_BINDIR>, <NEW_BINDIR>, <OLD_DATADIR>, <NEW_DATADIR>, <DATABASE>, and <USERNAME> are the old and new Postgres instance bin directories, old and new Postgres instance data directories, database name, and cluster's install user name respectively.

Options

The following table lists the options available for the pgd group set-leader command:

ShortLongDefaultEnvDescription
-b--old-bindirPGBINOLDOld Postgres instance bin directory
-B--new-bindirPGBINNEWNew Postgres instance bin directory
-d--old-datadirPGDATAOLDOld Postgres instance data directory
-D--new-datadirPGDATANEWNew Postgres instance data directory
--databasePGDATABASEPGD database name
-p--old-port5432PGPORTOLDOld Postgres instance port
--socketdir/var/run/postgresqlPGSOCKETDIRDirectory to use for postmaster sockets during upgrade
--checkSpecify to only perform checks and not modify clusters
-j--jobs1Number of simultaneous processes or threads to use
-k--linkUse hard links instead of copying files to the new cluster
--old-optionsOption to pass to old postgres command, multiple invocations are appended
--new-optionsOption to pass to new postgres command, multiple invocations are appended
-N--no-syncDon't wait for all files in the upgraded cluster to be written to disk
-P--new-port5432PGPORTNEWNew Postgres instance port number
-r--retainRetain SQL and log files even after successful completion
-U--usernamePGUSERCluster's install user name
--cloneUse efficient file cloning

See also Global Options.

Examples

Upgrade the PostgreSQL version on a node

pgd node node-one upgrade --old-bindir /usr/pgsql-16/bin --new-bindir /usr/pgsql-17/bin --old-datadir /var/lib/pgsql/16/data --new-datadir /var/lib/pgsql/17/data --database bdrdb --username enterprisedb
pgd node node-one upgrade --old-bindir /usr/pgsql-16/bin --new-bindir /usr/pgsql-17/bin --old-datadir /var/lib/pgsql/16/data --new-datadir /var/lib/pgsql/17/data --database bdrdb --username enterprisedb --link

Upgrade the PostgreSQL version on a node with efficient file cloning

pgd node node-one upgrade --old-bindir /usr/pgsql-16/bin --new-bindir /usr/pgsql-17/bin --old-datadir /var/lib/pgsql/16/data --new-datadir /var/lib/pgsql/17/data --database bdrdb --username enterprisedb --clone

Upgrade the PostgreSQL version on a node with a different port number

pgd node node-one upgrade --old-bindir /usr/pgsql-16/bin --new-bindir /usr/pgsql-17/bin --old-datadir /var/lib/pgsql/16/data --new-datadir /var/lib/pgsql/17/data --database bdrdb --username enterprisedb --old-port 5433 --new-port 5434

See also