Before you can run postgresql you'll need to create the database files in /var/lib/pgsql. The following should do the trick. # su postgres -c "initdb -D /var/lib/pgsql/19/data --locale=en_US.UTF-8 -A scram-sha-256 -W" Additionally, a logrotation script and init script are included. For production level log file handling please read https://www.postgresql.org/docs/19/logfile-maintenance.html In order to start postgresql at boot and stop it properly at shutdown, make sure rc.postgresql19 is executable and add the following lines to the following files: /etc/rc.d/rc.local ================== # Startup postgresql if [ -x /etc/rc.d/rc.postgresql19 ]; then /etc/rc.d/rc.postgresql19 start fi /etc/rc.d/rc.local_shutdown =========================== # Stop postgres if [ -x /etc/rc.d/rc.postgresql19 ]; then /etc/rc.d/rc.postgresql19 stop fi Additionally, rc.postgresql19 script has additional modes for stop/restart: force-stop|force-restart (i.e. pg_ctl 'fast' mode) unclean-stop|unclean-restart (i.e. pg_ctl 'immediate' mode) See https://www.postgresql.org/docs/19/app-pg-ctl.html From PostgreSQL 9.3 we support in place database upgrades using pg_upgrade: https://www.postgresql.org/docs/19/pgupgrade.html NOTE About Upgrading Databases initialized with PostgreSQL 19 initdb now have page checksums enabled by default. This can affect upgrades from non-checksum enabled clusters, which would require you to create a new PostgreSQL 19 cluster with the --no-data-checksums option when using pg_upgrade. A few hints for PostgreSQL 18.x -> 19.x upgrade: - Don't remove old PostgreSQL 18.x package (yet) - Install PostgreSQL 19.x, note that binaries are in '/usr/lib64/postgresql19/19/bin' - Create database file for postgresql 19 without data checksums # su postgres -c "initdb -D /var/lib/pgsql/19/data --no-data-checksums --locale=en_US.UTF-8 -A scram-sha-256 -W" - Adjust the pg_hba.conf in postgresql 19 to allow postgres user to connect - Run pg_upgrade (as postgres user) $ pg_upgrade --old-datadir /var/lib/pgsql/18/data/ --new-datadir /var/lib/pgsql/19/data/ --old-bindir /usr/lib64/postgresql18/18/bin/ --new-bindir /usr/lib64/postgresql19/19/bin/ -U postgres - Start postgresql 19 service - Optionally, vacuum all database /usr/lib{64}/postgresql19/19/bin/vacuumdb -U postgres --all --analyze-in-stages --missing-stats-only /usr/lib{64}/postgresql19/19/bin/vacuumdb -U postgres --all --analyze-only To remove old's cluster data files, run: ./delete_old_cluster.sh - Remove old package when transition is over, or read comments in rc.postgresql if you want to run multiple PostgreSQL versions in parallel - If you encounter a collation version mismatch after logging to psql, you can rebuild all objects in the database using this commands: REINDEX DATABASE ; ALTER DATABASE REFRESH COLLATION VERSION; This script builds postgresql with some useful extension modules from the contrib directory, see PG_EXTENSIONS in SlackBuild file. To build PostgreSQL with all extensions, use the following command: # PG_EXTENSIONS=ALL ./postgresql.SlackBuild Please note that in order to actually use extension, you must execute 'CREATE EXTENSION [ IF NOT EXISTS ] extension_name' for each extension.