I have performed the installation of the recommended OS for ppg16.
[root@rocky8 ~]# cat /etc/redhat-release
Rocky Linux release 8.9 (Green Obsidian)
[root@rocky8 ~]# openssl version
OpenSSL 1.1.1k FIPS 25 Mar 2021
[root@rocky8 ~]# useradd postgres -m
[root@rocky8 ~]# passwd postgres
Changing password for user postgres.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@rocky8 ~]# su - postgres
[root@rocky8 ~]# chown -R postgres:postgres /home/postgres/percona-postgresql-16.3-ssl1.1-linux-x86_64.tar.gz
[root@rocky8 ~]# su - postgres
[root@rocky8 ~]# mkdir -p /usr/local/pgsql16.3
[root@rocky8 local]# ln -s /usr/local/pgsql16.3 /usr/local/pgsql
[root@rocky8 local]# ll
total 0
drwxr-xr-x. 2 root root 6 Oct 11 2021 bin
drwxr-xr-x. 2 root root 6 Oct 11 2021 etc
drwxr-xr-x. 2 root root 6 Oct 11 2021 games
drwxr-xr-x. 2 root root 6 Oct 11 2021 include
drwxr-xr-x. 2 root root 6 Oct 11 2021 lib
drwxr-xr-x. 3 root root 17 Jan 10 2024 lib64
drwxr-xr-x. 2 root root 6 Oct 11 2021 libexec
lrwxrwxrwx. 1 root root 20 Jul 17 13:33 pgsql -> /usr/local/pgsql16.3
drwxr-xr-x. 2 root root 6 Jul 17 13:32 pgsql16.3
drwxr-xr-x. 2 root root 6 Oct 11 2021 sbin
drwxr-xr-x. 5 root root 49 Jan 10 2024 share
drwxr-xr-x. 2 root root 6 Oct 11 2021 src
[root@rocky8 pgsql]# tar xf /home/postgres/percona-postgresql-16.3-ssl1.1-linux-x86_64.tar.gz -C ./
[root@rocky8 local]# chown -R postgres:postgres pgsql
[root@rocky8 local]# chown -R postgres:postgres pgsql16.3
[root@rocky8 pgsql]# cp -r percona-perl percona-python3 percona-tcl /opt/
[root@rocky8 pgsql]# ll /opt
total 0
drwxr-xr-x. 5 root root 39 Jul 17 13:36 percona-perl
drwxr-xr-x. 6 root root 56 Jul 17 13:36 percona-python3
drwxr-xr-x. 7 root root 67 Jul 17 13:36 percona-tcl
drwxr-xr-x. 8 root root 136 Jan 10 2024 VBoxGuestAdditions-6.1.30
[root@rocky8 pgsql]# chown -R postgres:postgres /opt/percona-*
[root@rocky8 pgsql]# ll
total 0
drwxr-xr-x. 3 postgres postgres 17 Jun 5 10:39 percona-etcd
drwxr-xr-x. 7 postgres postgres 64 Jun 5 10:39 percona-haproxy
drwxr-xr-x. 4 postgres postgres 53 Jun 5 10:38 percona-patroni
drwxr-xr-x. 5 postgres postgres 39 Jun 5 10:25 percona-perl
drwxr-xr-x. 5 postgres postgres 65 Jun 5 10:38 percona-pgbackrest
drwxr-xr-x. 3 postgres postgres 85 Jun 5 10:38 percona-pgbadger
drwxr-xr-x. 6 postgres postgres 52 Jun 5 10:37 percona-pgbouncer
drwxr-xr-x. 7 postgres postgres 67 Jun 5 10:37 percona-pgpool-II
drwxr-xr-x. 7 postgres postgres 67 Jun 5 10:37 percona-postgresql16
drwxr-xr-x. 6 postgres postgres 56 Jun 5 10:29 percona-python3
drwxr-xr-x. 7 postgres postgres 67 Jun 5 10:31 percona-tcl
[root@rocky8 pgsql]# ll /opt
total 0
drwxr-xr-x. 5 postgres postgres 39 Jul 17 13:36 percona-perl
drwxr-xr-x. 6 postgres postgres 56 Jul 17 13:36 percona-python3
drwxr-xr-x. 7 postgres postgres 67 Jul 17 13:36 percona-tcl
drwxr-xr-x. 8 root root 136 Jan 10 2024 VBoxGuestAdditions-6.1.30
[root@rocky8 pgsql]# cd
[root@rocky8 ~]# su - postgres
Last login: Wed Jul 17 13:35:24 UTC 2024 on pts/0
[postgres@rocky8 ~]$ vim .bash_profile
[postgres@rocky8 ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export PATH=:/usr/local/pgsql/percona-haproxy/sbin/:/usr/local/pgsql/percona-patroni/bin/:/usr/local/pgsql/percona-pgbackrest/bin/:/usr/local/pgsql/percona-pgbadger/:/usr/local/pgsql/percona-pgbouncer/bin/:/usr/local/pgsql/percona-pgpool-II/bin/:/usr/local/pgsql/percona-postgresql16/bin/:/usr/local/pgsql/percona-etcd/bin/:/opt/percona-perl/bin/:/opt/percona-tcl/bin/:/opt/percona-python3/bin/:$PATH
[postgres@rocky8 ~]$ source .bash_profile
[postgres@rocky8 ~]$ exit
logout
[root@rocky8 ~]# mkdir /pgdata
[root@rocky8 ~]# chown postgres:postgres /pgdata/
[root@rocky8 ~]# su - postgres
Last login: Wed Jul 17 13:36:53 UTC 2024 on pts/0
[postgres@rocky8 ~]$ initdb -D /pgdata/
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /pgdata ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
pg_ctl -D /pgdata/ -l logfile start
[postgres@rocky8 ~]$
[postgres@rocky8 ~]$
[postgres@rocky8 ~]$
[postgres@rocky8 ~]$ pg_ctl -D /pgdata/ -l logfile start
waiting for server to start.... done
server started
[postgres@rocky8 ~]$ psql
psql (16.3)
Type "help" for help.
postgres=#
postgres=#
postgres=#
postgres=# \q
could not save history to file "/home/postgres/.psql_history": Success
[postgres@rocky8 ~]$
[postgres@rocky8 ~]$ cat /etc/redhat-release
Rocky Linux release 8.9 (Green Obsidian)
[postgres@rocky8 ~]$ psql
psql (16.3)
Type "help" for help.
postgres=# WITH cur_vaccs AS (
postgres(# SELECT split_part(split_part(substring(query from '.*..*'), '.', 2), ' ', 1) AS tab
postgres(# FROM pg_stat_activity
postgres(# WHERE query LIKE 'autovacuum%'
postgres(# )
postgres-# SELECT 'VACUUM (FREEZE, ANALYZE) "'|| n.nspname ||'"."' || c.relname ||'";'
postgres-# FROM pg_class c
postgres-# JOIN pg_namespace n ON c.relnamespace = n.oid
postgres-# LEFT JOIN pg_class t ON c.reltoastrelid = t.oid AND t.relkind = 't'
postgres-# WHERE c.relkind IN ('r', 'm') AND NOT EXISTS (
postgres(# SELECT * FROM cur_vaccs WHERE tab = c.relname
postgres(# )
postgres-# ORDER BY GREATEST(age(c.relfrozenxid), age(t.relfrozenxid)) DESC
postgres-# LIMIT 100;
?column?
--------------------------------------------------------------------------
VACUUM (FREEZE, ANALYZE) "information_schema"."sql_sizing";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_type";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_foreign_table";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_authid";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_statistic_ext_data";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_user_mapping";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_subscription";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_attribute";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_proc";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_class";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_attrdef";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_constraint";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_inherits";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_index";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_operator";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_opfamily";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_opclass";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_am";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_amop";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_amproc";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_language";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_largeobject_metadata";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_aggregate";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_statistic_ext";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_rewrite";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_trigger";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_event_trigger";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_description";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_cast";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_enum";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_namespace";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_conversion";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_depend";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_statistic";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_db_role_setting";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_tablespace";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_auth_members";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_shdepend";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_shdescription";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_ts_config";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_ts_config_map";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_ts_dict";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_ts_parser";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_ts_template";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_extension";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_foreign_data_wrapper";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_foreign_server";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_policy";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_replication_origin";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_default_acl";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_init_privs";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_seclabel";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_shseclabel";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_collation";
VACUUM (FREEZE, ANALYZE) "pg_catalog"."pg_parameter_acl";
postgres=# \q
could not save history to file "/home/postgres/.psql_history": Success
[postgres@rocky8 ~]$ psql
psql (16.3)
Type "help" for help.
malloc(): invalid size (unsorted)
Aborted (core dumped)
[postgres@rocky8 ~]$
[postgres@rocky8 ~]$ ll /pgdata/
total 64
drwx------. 5 postgres postgres 33 Jul 17 13:39 base
drwx------. 2 postgres postgres 4096 Jul 17 13:42 global
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_commit_ts
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_dynshmem
-rw-------. 1 postgres postgres 5711 Jul 17 13:39 pg_hba.conf
-rw-------. 1 postgres postgres 2640 Jul 17 13:39 pg_ident.conf
drwx------. 4 postgres postgres 68 Jul 17 13:39 pg_logical
drwx------. 4 postgres postgres 36 Jul 17 13:39 pg_multixact
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_notify
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_replslot
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_serial
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_snapshots
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_stat
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_stat_tmp
drwx------. 2 postgres postgres 18 Jul 17 13:39 pg_subtrans
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_tblspc
drwx------. 2 postgres postgres 6 Jul 17 13:39 pg_twophase
-rw-------. 1 postgres postgres 3 Jul 17 13:39 PG_VERSION
drwx------. 3 postgres postgres 60 Jul 17 13:39 pg_wal
drwx------. 2 postgres postgres 18 Jul 17 13:39 pg_xact
-rw-------. 1 postgres postgres 88 Jul 17 13:39 postgresql.auto.conf
-rw-------. 1 postgres postgres 29676 Jul 17 13:39 postgresql.conf
-rw-------. 1 postgres postgres 70 Jul 17 13:39 postmaster.opts
-rw-------. 1 postgres postgres 73 Jul 17 13:39 postmaster.pid
Hope to get help from the community.