H.7. slru_upgrader#
H.7. slru_upgrader #
H.7.1. Overview #
Starting with Tantor SE version 16, several configuration
parameters that control buffer allocation for the Simple Least
Recently Used (SLRU) mechanism were renamed. When the
postgresql.conf file contains old parameter
names, the server will fail to start after upgrading to version
16.
upgrade-SLRU-from-TT_15-to-TT_16-version.sh
automates the migration of these parameters renaming them in the
postgresql.conf file in place located in the
data directory specified by the PGDATA
environment variable.
The following parameter names have been updated:
| Old Name (Tantor SE 15) | New Name (Tantor SE 16) |
|---|---|
commit_ts_buffers
|
commit_timestamp_buffers
|
serial_buffers
|
serializable_buffers
|
subtrans_buffers
|
subtransaction_buffers
|
xact_buffers
|
transaction_buffers
|
Before modifying the configuration file, the script creates a
backup copy in $PGDATA/postgresql.conf.bak. It
is recommended to verify the updated configuration and remove the
backup once the server starts correctly.
H.7.2. Synopsis #
PGDATA='/path/to/data' /opt/tantor/db/17/tools/slru_upgrader/upgrade-SLRU-from-TT_15-to-TT_16-version.sh [option]
H.7.2.1. Options #
- --help
Display usage information and exit.
H.7.3. Environment #
- PGDATA
Specifies the path to the Tantor SE data directory that contains
postgresql.conf. This variable must be set before running the script.
H.7.4. Usage #
Typical usage during a major version upgrade from Tantor SE 15 to 17:
Stop the database server running Tantor SE 15.
Set the
PGDATAenvironment variable to point to the data directory that will be used by Tantor SE 17:export PGDATA='/var/lib/postgresql/tantor-se-17/data'
Run the upgrade script:
/opt/tantor/db/17/tools/slru_upgrader/upgrade-SLRU-from-TT_15-to-TT_16-version.sh
Start the Tantor SE 17 server and verify that it operates correctly.
Once the configuration has been verified, remove the backup:
rm "$PGDATA/postgresql.conf.bak"
H.7.5. Notes #
The script exits immediately if any command fails (
set -e).If a parameter is not present in
postgresql.conf, it is silently skipped.Leading whitespace before parameter names is handled correctly; however, lines that are commented out (prefixed with
#) are not modified.The script does not validate parameter values — only the parameter names are renamed.
H.7.6. Exit Status #
0 — the configuration file was successfully
updated (or no matching parameters were found).
1 — an error occurred. Possible causes include:
PGDATAis not set.postgresql.confdoes not exist in the specified data directory.An unknown command-line option was provided.