Install EDB Postgres Advanced Server 17 on Linux 8
Table of Contents
1. Setup EDB repository
--Logon https://www.enterprisedb.com/repos and select ---> RHEL8 x86_64 then ----> EDB Postgres Advanced Server ---> 17
[root@lxtrdedbpsgv01 ~]# curl -1sSLf 'https://downloads.enterprisedb.com/PMuvhbPsvEt9Rd4ORs5gnUT6z1L4P85R/enterprise/setup.rpm.sh' | sudo -E bash
Executing the setup script for the 'enterprisedb/enterprise' repository ...
OK: Checking for required executable 'curl' ...
OK: Checking for required executable 'rpm' ...
OK: Detecting your OS distribution and release using system methods ...
^^^^: ... Detected/provided for your OS/distribution, version and architecture:
>>>>:
>>>>: ... distro=ol version=8.7 codename=8.7 arch=x86_64
>>>>:
OK: Importing 'enterprisedb/enterprise' repository GPG keys into rpm ...
OK: Checking for available package manager (DNF/Microdnf/YUM/Zypper) ...
^^^^: ... Detected package manager as 'dnf'
OK: Checking for dnf dependency 'dnf-plugins-core' ...
OK: Checking if upstream install config is OK ...
OK: Fetching 'enterprisedb/enterprise' repository configuration ...
OK: Installing 'enterprisedb/enterprise' repository via dnf ...
RUN: Updating the dnf cache to fetch the new repository metadata ...Importing GPG key 0x9F1EF813:
Userid : "Cloudsmith Package (enterprisedb/enterprise) <support@cloudsmith.io>"
Fingerprint: 31A4 CF09 0B3A E265 F131 58DE E71E B082 9F1E F813
From : https://downloads.enterprisedb.com/PMuvhbPsvEt9Rd4ORs5gnUT6z1L4P85R/enterprise/gpg.E71EB0829F1EF813.key
Importing GPG key 0x9F1EF813:
Userid : "Cloudsmith Package (enterprisedb/enterprise) <support@cloudsmith.io>"
Fingerprint: 31A4 CF09 0B3A E265 F131 58DE E71E B082 9F1E F813
From : https://downloads.enterprisedb.com/PMuvhbPsvEt9Rd4ORs5gnUT6z1L4P85R/enterprise/gpg.E71EB0829F1EF813.key
Importing GPG key 0x9F1EF813:
Userid : "Cloudsmith Package (enterprisedb/enterprise) <support@cloudsmith.io>"
Fingerprint: 31A4 CF09 0B3A E265 F131 58DE E71E B082 9F1E F813
From : https://downloads.enterprisedb.com/PMuvhbPsvEt9Rd4ORs5gnUT6z1L4P85R/enterprise/gpg.E71EB0829F1EF813.key
OK: Updating the dnf cache to fetch the new repository metadata ...
OK: The repository has been installed successfully - You're ready to rock!
[root@lxtrdedbpsgv01 ~]#
[root@lxtrdedbpsgv01 ~]# dnf repolist | grep -i enterprisedb
enterprisedb-enterprise enterprisedb-enterprise
enterprisedb-enterprise-noarch enterprisedb-enterprise-noarch
enterprisedb-enterprise-source enterprisedb-enterprise-source
[root@lxtrdedbpsgv01 ~]#
2. Install EDB Postgres Advanced Server 17
[root@lxtrdedbpsgv01 ~]# dnf -y install edb-as17-server
..
Dependencies resolved.
========================================================================================================================================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================================================================================================================================
Installing:
edb-as17-server x86_64 17.11.0-1.el8 enterprisedb-enterprise 12 k
Installing dependencies:
edb-as17-server-client x86_64 17.11.0-1.el8 enterprisedb-enterprise 2.2 M
edb-as17-server-contrib x86_64 17.11.0-1.el8 enterprisedb-enterprise 831 k
edb-as17-server-core x86_64 17.11.0-1.el8 enterprisedb-enterprise 7.4 M
edb-as17-server-docs x86_64 17.11.0-1.el8 enterprisedb-enterprise 21 k
edb-as17-server-ecpg x86_64 17.11.0-1.el8 enterprisedb-enterprise 416 k
edb-as17-server-libs x86_64 17.11.0-1.el8 enterprisedb-enterprise 652 k
edb-as17-server-plperl x86_64 17.11.0-1.el8 enterprisedb-enterprise 76 k
edb-as17-server-plpython3 x86_64 17.11.0-1.el8 enterprisedb-enterprise 110 k
edb-as17-server-pltcl x86_64 17.11.0-1.el8 enterprisedb-enterprise 49 k
edb-libicu66 x86_64 66.1-3.el8 enterprisedb-enterprise 9.2 M
tcl x86_64 1:8.6.8-2.el8 ol8_baseos_latest 1.1 M
Installing weak dependencies:
beacon-agent x86_64 1.401.5-1 enterprisedb-enterprise 115 M
Transaction Summary
========================================================================================================================================================================================================================================
Install 13 Packages
Total download size: 137 M
Installed size: 412 M
Downloading Packages:
(1/13): edb-as17-server-17.11.0-1.el8.x86_64.rpm 9.1 kB/s | 12 kB 00:01
(2/13): edb-as17-server-client-17.11.0-1.el8.x86_64.rpm 1.0 MB/s | 2.2 MB 00:02
(3/13): edb-as17-server-contrib-17.11.0-1.el8.x86_64.rpm 448 kB/s | 831 kB 00:01
(4/13): edb-as17-server-docs-17.11.0-1.el8.x86_64.rpm 17 kB/s | 21 kB 00:01
(5/13): edb-as17-server-core-17.11.0-1.el8.x86_64.rpm 2.8 MB/s | 7.4 MB 00:02
(6/13): edb-as17-server-ecpg-17.11.0-1.el8.x86_64.rpm 273 kB/s | 416 kB 00:01
(7/13): edb-as17-server-libs-17.11.0-1.el8.x86_64.rpm 433 kB/s | 652 kB 00:01
(8/13): edb-as17-server-plperl-17.11.0-1.el8.x86_64.rpm 54 kB/s | 76 kB 00:01
(9/13): edb-as17-server-plpython3-17.11.0-1.el8.x86_64.rpm 72 kB/s | 110 kB 00:01
(10/13): edb-as17-server-pltcl-17.11.0-1.el8.x86_64.rpm 50 kB/s | 49 kB 00:00
(11/13): tcl-8.6.8-2.el8.x86_64.rpm 1.3 MB/s | 1.1 MB 00:00
(12/13): beacon-agent-1.401.5_linux_amd64.rpm 6.9 MB/s | 115 MB 00:16
(13/13): edb-libicu66-66.1-3.el8.x86_64.rpm 1.1 MB/s | 9.2 MB 00:08
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 8.2 MB/s | 137 MB 00:16
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : edb-libicu66-66.1-3.el8.x86_64 1/13
Running scriptlet: edb-libicu66-66.1-3.el8.x86_64 1/13
Installing : edb-as17-server-libs-17.11.0-1.el8.x86_64 2/13
Running scriptlet: edb-as17-server-libs-17.11.0-1.el8.x86_64 2/13
Installing : edb-as17-server-ecpg-17.11.0-1.el8.x86_64 3/13
Installing : edb-as17-server-client-17.11.0-1.el8.x86_64 4/13
Running scriptlet: edb-as17-server-client-17.11.0-1.el8.x86_64 4/13
Installing : edb-as17-server-contrib-17.11.0-1.el8.x86_64 5/13
Installing : tcl-1:8.6.8-2.el8.x86_64 6/13
Running scriptlet: tcl-1:8.6.8-2.el8.x86_64 6/13
Installing : edb-as17-server-docs-17.11.0-1.el8.x86_64 7/13
Installing : beacon-agent-1.401.5-1.x86_64 8/13
Running scriptlet: edb-as17-server-core-17.11.0-1.el8.x86_64 9/13
Installing : edb-as17-server-core-17.11.0-1.el8.x86_64 9/13
Running scriptlet: edb-as17-server-core-17.11.0-1.el8.x86_64 9/13
Installing : edb-as17-server-plperl-17.11.0-1.el8.x86_64 10/13
Installing : edb-as17-server-plpython3-17.11.0-1.el8.x86_64 11/13
Installing : edb-as17-server-pltcl-17.11.0-1.el8.x86_64 12/13
Installing : edb-as17-server-17.11.0-1.el8.x86_64 13/13
Running scriptlet: edb-as17-server-17.11.0-1.el8.x86_64 13/13
Verifying : beacon-agent-1.401.5-1.x86_64 1/13
Verifying : edb-as17-server-17.11.0-1.el8.x86_64 2/13
Verifying : edb-as17-server-client-17.11.0-1.el8.x86_64 3/13
Verifying : edb-as17-server-contrib-17.11.0-1.el8.x86_64 4/13
Verifying : edb-as17-server-core-17.11.0-1.el8.x86_64 5/13
Verifying : edb-as17-server-docs-17.11.0-1.el8.x86_64 6/13
Verifying : edb-as17-server-ecpg-17.11.0-1.el8.x86_64 7/13
Verifying : edb-as17-server-libs-17.11.0-1.el8.x86_64 8/13
Verifying : edb-as17-server-plperl-17.11.0-1.el8.x86_64 9/13
Verifying : edb-as17-server-plpython3-17.11.0-1.el8.x86_64 10/13
Verifying : edb-as17-server-pltcl-17.11.0-1.el8.x86_64 11/13
Verifying : edb-libicu66-66.1-3.el8.x86_64 12/13
Verifying : tcl-1:8.6.8-2.el8.x86_64 13/13
Installed:
beacon-agent-1.401.5-1.x86_64 edb-as17-server-17.11.0-1.el8.x86_64 edb-as17-server-client-17.11.0-1.el8.x86_64 edb-as17-server-contrib-17.11.0-1.el8.x86_64 edb-as17-server-core-17.11.0-1.el8.x86_64
edb-as17-server-docs-17.11.0-1.el8.x86_64 edb-as17-server-ecpg-17.11.0-1.el8.x86_64 edb-as17-server-libs-17.11.0-1.el8.x86_64 edb-as17-server-plperl-17.11.0-1.el8.x86_64 edb-as17-server-plpython3-17.11.0-1.el8.x86_64
edb-as17-server-pltcl-17.11.0-1.el8.x86_64 edb-libicu66-66.1-3.el8.x86_64 tcl-1:8.6.8-2.el8.x86_64
Complete!
[root@lxtrdedbpsgv01 ~]#
[root@lxtrdedbpsgv01 ~]# rpm -qa | grep edb-as17
edb-as17-server-libs-17.11.0-1.el8.x86_64
edb-as17-server-plperl-17.11.0-1.el8.x86_64
edb-as17-server-docs-17.11.0-1.el8.x86_64
edb-as17-server-client-17.11.0-1.el8.x86_64
edb-as17-server-pltcl-17.11.0-1.el8.x86_64
edb-as17-server-contrib-17.11.0-1.el8.x86_64
edb-as17-server-core-17.11.0-1.el8.x86_64
edb-as17-server-17.11.0-1.el8.x86_64
edb-as17-server-ecpg-17.11.0-1.el8.x86_64
edb-as17-server-plpython3-17.11.0-1.el8.x86_64
[root@lxtrdedbpsgv01 ~]#
[root@lxtrdedbpsgv01 ~]# /usr/edb/as17/bin/psql --version
psql (EnterpriseDB) 17.11.0
[root@lxtrdedbpsgv01 ~]#
3. Check and reset EDB user password
[root@lxtrdedbpsgv01 ~]# id enterprisedb
uid=972(enterprisedb) gid=972(enterprisedb) groups=972(enterprisedb)
[root@lxtrdedbpsgv01 ~]# getent passwd enterprisedb
enterprisedb:x:972:972:EDBAS User:/var/lib/edb:/bin/bash
[root@lxtrdedbpsgv01 ~]#
[root@lxtrdedbpsgv01 ~]# passwd enterprisedb
Changing password for user enterprisedb.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@lxtrdedbpsgv01 ~]#
4. Change ownership for mount points
[root@lxtrdedbpsgv01 ~]# chown -R enterprisedb:enterprisedb /edb*
[root@lxtrdedbpsgv01 ~]#
[root@lxtrdedbpsgv01 ~]# df -h /edb/*
Filesystem Size Used Avail Use% Mounted on
/dev/sdf1 100G 746M 100G 1% /edb/pgArch
/dev/sdd1 100G 746M 100G 1% /edb/pgBackup
/dev/sdb1 100G 746M 100G 1% /edb/pgData
/dev/sde1 100G 746M 100G 1% /edb/pgBin
/dev/sdc1 100G 746M 100G 1% /edb/tsdata
[root@lxtrdedbpsgv01 ~]#
5. Setup custom Bin directory (Optional)
[root@lxtrdedbpsgv01 ~]# ls -l /usr/edb/as17/
total 36
drwxr-xr-x. 2 root root 4096 Aug 22 03:49 bin
-r--r--r--. 1 root root 15716 Aug 12 12:26 edb-as17-server_license.txt
drwxr-xr-x. 3 root root 8192 Aug 22 03:49 lib
drwxr-xr-x. 9 root root 4096 Aug 22 03:49 share
[root@lxtrdedbpsgv01 ~]#
[root@lxtrdedbpsgv01 ~]# cp -rp /usr/edb/as17 /edb/pgBin
[root@lxtrdedbpsgv01 ~]#
[root@lxtrdedbpsgv01 ~]# ls -l /edb/pgBin/as17/
total 32
drwxr-xr-x. 2 root root 4096 Aug 22 03:49 bin
-r--r--r--. 1 root root 15716 Aug 12 12:26 edb-as17-server_license.txt
drwxr-xr-x. 3 root root 4096 Aug 22 03:49 lib
drwxr-xr-x. 9 root root 4096 Aug 22 03:49 share
[root@lxtrdedbpsgv01 ~]#
[root@lxtrdedbpsgv01 ~]# chown -R enterprisedb:enterprisedb /edb/pgBin/*
[root@lxtrdedbpsgv01 ~]# ls -l /edb/pgBin/as17/
total 32
drwxr-xr-x. 2 enterprisedb enterprisedb 4096 Aug 22 03:49 bin
-r--r--r--. 1 enterprisedb enterprisedb 15716 Aug 12 12:26 edb-as17-server_license.txt
drwxr-xr-x. 3 enterprisedb enterprisedb 4096 Aug 22 03:49 lib
drwxr-xr-x. 9 enterprisedb enterprisedb 4096 Aug 22 03:49 share
[root@lxtrdedbpsgv01 ~]#
One caution: simply copying /usr/edb/as17 can miss RPM-managed symlinks, configuration files, or dependencies outside that directory. Also, future dnf update operations will update /usr/edb/as17, but will not automatically update /edb/pgBase. So after an EDB RPM upgrade, you would need to copy the new binaries again.
rsync -av /usr/edb/as17/ /edb/pgBin/as17
6. Configure environment variables
[root@lxtrdedbpsgv01 ~]# su - enterprisedb
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ cat .bash_profile
export PGHOME=/edb/pgBin/as17
export PGDATA=/edb/pgData/as17/data
export PATH=$PGHOME/bin:$PATH
[enterprisedb@lxtrdedbpsgv01 ~]$ . .bash_profile
[enterprisedb@lxtrdedbpsgv01 ~]$ which pg_ctl
/edb/pgBin/as17/bin/pg_ctl
[enterprisedb@lxtrdedbpsgv01 ~]$ which psql
/edb/pgBin/as17/bin/psql
[enterprisedb@lxtrdedbpsgv01 ~]$ which pg_basebackup
/edb/pgBin/as17/bin/pg_basebackup
[enterprisedb@lxtrdedbpsgv01 ~]$ which pg_rewind
/edb/pgBin/as17/bin/pg_rewind
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ pg_ctl --version
pg_ctl (EnterpriseDB) 17.11.0
[enterprisedb@lxtrdedbpsgv01 ~]$ psql --version
psql (EnterpriseDB) 17.11.0
[enterprisedb@lxtrdedbpsgv01 ~]$
7. Initialize the database
[enterprisedb@lxtrdedbpsgv01 ~]$ which initdb
/edb/pgBin/as17/bin/initdb
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ initdb --version
initdb (EnterpriseDB) 17.11.0
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ which edb-as-17-setup
/edb/pgBin/as17/bin/edb-as-17-setup
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ ls -ld /edb/pgData/as17/data
ls: cannot access '/edb/pgData/as17/data': No such file or directory
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ mkdir -p /edb/pgData/as17/data
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ chmod 700 /edb/pgData/as17/data
[enterprisedb@lxtrdedbpsgv01 ~]$ ls -ld /edb/pgData/as17/data
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:16 /edb/pgData/as17/data
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ /edb/pgBin/as17/bin/initdb -D /edb/pgData/as17/data
The files belonging to this database system will be owned by user "enterprisedb".
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.
Transparent data encryption is disabled.
fixing permissions on existing directory /edb/pgData/as17/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default "max_connections" ... 100
selecting default "shared_buffers" ... 128MB
selecting default time zone ... America/New_York
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
creating edb sys ... ok
loading edb contrib modules ...
edb_redwood_bytea.sql
edb_redwood_date.sql
dbms_alert_public.sql
dbms_alert.plb
dbms_assert_public.sql
dbms_assert.plb
dbms_job_public.sql
dbms_job.plb
dbms_lob_public.sql
dbms_lob.plb
dbms_output_public.sql
dbms_output.plb
dbms_pipe_public.sql
dbms_pipe.plb
dbms_rls_public.sql
dbms_rls.plb
dbms_sql_public.sql
dbms_sql.plb
dbms_utility_public.sql
dbms_utility.plb
dbms_aqadm_public.sql
dbms_aqadm.plb
dbms_aq_public.sql
dbms_aq.plb
dbms_profiler_public.sql
dbms_profiler.plb
dbms_random_public.sql
dbms_random.plb
dbms_redact_public.sql
dbms_redact.plb
dbms_lock_public.sql
dbms_lock.plb
dbms_scheduler_public.sql
dbms_scheduler.plb
dbms_crypto_public.sql
dbms_crypto.plb
dbms_mview_public.sql
dbms_mview.plb
dbms_session_public.sql
dbms_session.plb
xmltype_public.sql
xmltype.plb
dbms_xmldom_public.sql
dbms_xmldom.plb
dbms_privilege_capture_public.sql
dbms_privilege_capture.plb
edb_bulkload.sql
edb_gen.sql
edb_objects.sql
edb_redwood_casts.sql
edb_redwood_nls.sql
edb_redwood_strings.sql
edb_redwood_views.sql
utl_encode_public.sql
utl_encode.plb
utl_http_public.sql
utl_http.plb
utl_file.plb
edb_ht_public.sql
edb_ht.plb
utl_tcp_public.sql
utl_tcp.plb
utl_smtp_public.sql
utl_smtp.plb
utl_mail_public.sql
utl_mail.plb
utl_url_public.sql
utl_url.plb
utl_raw_public.sql
utl_raw.plb
edb_gen_redwood.sql
waitstates.sql
installing extension edb_dblink_libpq ... ok
installing extension edb_dblink_oci ... ok
snap_tables.sql
snap_functions.sql
dblink_ora.sql
sys_stats.sql
ok
finalizing initial databases ... 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:
/edb/pgBin/as17/bin/pg_ctl -D /edb/pgData/as17/data -l logfile start
[enterprisedb@lxtrdedbpsgv01 ~]$
8. Start PostgreSQL Service
[enterprisedb@lxtrdedbpsgv01 ~]$ /edb/pgBin/as17/bin/pg_ctl -D /edb/pgData/as17/data -l /tmp/postgresql.log start
waiting for server to start.... done
server started
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ ps -ef | grep postgres
enterpr+ 42936 1 0 06:25 ? 00:00:00 /edb/pgBin/as17/bin/edb-postgres -D /edb/pgData/as17/data
enterpr+ 42937 42936 0 06:25 ? 00:00:00 postgres: logger
enterpr+ 42938 42936 0 06:25 ? 00:00:00 postgres: checkpointer
enterpr+ 42939 42936 0 06:25 ? 00:00:00 postgres: background writer
enterpr+ 42941 42936 0 06:25 ? 00:00:00 postgres: walwriter
enterpr+ 42942 42936 0 06:25 ? 00:00:00 postgres: autovacuum launcher
enterpr+ 42943 42936 0 06:25 ? 00:00:00 postgres: dbms_aq launcher
enterpr+ 42944 42936 0 06:25 ? 00:00:00 postgres: logical replication launcher
enterpr+ 43022 41905 0 06:28 pts/0 00:00:00 grep --color=auto postgres
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ pstree -p 42936
edb-postgres(42936)─┬─edb-postgres(42937)
├─edb-postgres(42938)
├─edb-postgres(42939)
├─edb-postgres(42941)
├─edb-postgres(42942)
├─edb-postgres(42943)
└─edb-postgres(42944)
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ ls -ltr /edb/pgData/as17/data
total 76
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_twophase
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_tblspc
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_stat_tmp
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_snapshots
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_serial
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_replslot
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_notify
drwx------. 4 enterprisedb enterprisedb 36 Aug 22 06:24 pg_multixact
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_dynshmem
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:24 pg_commit_ts
-rw-------. 1 enterprisedb enterprisedb 3 Aug 22 06:24 PG_VERSION
-rw-------. 1 enterprisedb enterprisedb 38410 Aug 22 06:24 postgresql.conf
-rw-------. 1 enterprisedb enterprisedb 88 Aug 22 06:24 postgresql.auto.conf
-rw-------. 1 enterprisedb enterprisedb 2640 Aug 22 06:24 pg_ident.conf
-rw-------. 1 enterprisedb enterprisedb 5711 Aug 22 06:24 pg_hba.conf
drwx------. 2 enterprisedb enterprisedb 18 Aug 22 06:24 pg_xact
drwx------. 2 enterprisedb enterprisedb 18 Aug 22 06:24 pg_subtrans
drwx------. 4 enterprisedb enterprisedb 109 Aug 22 06:24 pg_wal
drwx------. 6 enterprisedb enterprisedb 46 Aug 22 06:24 base
drwx------. 4 enterprisedb enterprisedb 68 Aug 22 06:24 pg_logical
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:25 dbms_pipe
drwx------. 2 enterprisedb enterprisedb 48 Aug 22 06:25 log
-rw-------. 1 enterprisedb enterprisedb 46 Aug 22 06:25 current_logfiles
-rw-------. 1 enterprisedb enterprisedb 62 Aug 22 06:25 postmaster.opts
drwx------. 2 enterprisedb enterprisedb 6 Aug 22 06:25 pg_stat
-rw-------. 1 enterprisedb enterprisedb 88 Aug 22 06:25 postmaster.pid
drwx------. 2 enterprisedb enterprisedb 4096 Aug 22 06:27 global
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ psql -d postgres -c "SELECT version();"
version
-------------------------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 17.11 (EnterpriseDB Advanced Server 17.11.0) on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-28), 64-bit
(1 row)
[enterprisedb@lxtrdedbpsgv01 ~]$
[enterprisedb@lxtrdedbpsgv01 ~]$ psql -d postgres
psql (17.11.0)
Type "help" for help.
postgres=#
postgres=# \l
List of databases
Name | Owner | Encoding | Locale Provider | Collate | Ctype | ICU | Locale | ICU Rules | Access privileges
-----------+--------------+----------+-----------------+-------------+-------------+-----+--------+-----------+-------------------------------
edb | enterprisedb | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | |
postgres | enterprisedb | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | |
template0 | enterprisedb | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | | =c/enterprisedb +
| | | | | | | | | enterprisedb=CTc/enterprisedb
template1 | enterprisedb | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | | =c/enterprisedb +
| | | | | | | | | enterprisedb=CTc/enterprisedb
(4 rows)
postgres=#
postgres=# \conninfo
You are connected to database "postgres" as user "enterprisedb" via socket in "/tmp" at port "5444".
postgres=#
postgres=# \du
List of roles
Role name | Attributes
---------------------------+------------------------------------------------------------
aq_administrator_role | No inheritance, Cannot login +
| Profile default
capture_admin | No inheritance, Cannot login +
| Profile default
edb_createdirectory_admin | No inheritance, Cannot login +
| Profile default
edb_dropdirectory_admin | No inheritance, Cannot login +
| Profile default
enterprisedb | Superuser, Create role, Create DB, Replication, Bypass RLS+
| Profile default
postgres=# ALTER USER enterprisedb PASSWORD 'oracle';
ALTER ROLE
postgres=#
postgres=# \duS
List of roles
Role name | Attributes
-----------------------------+------------------------------------------------------------
aq_administrator_role | No inheritance, Cannot login +
| Profile default
capture_admin | No inheritance, Cannot login +
| Profile default
edb_createdirectory_admin | No inheritance, Cannot login +
| Profile default
edb_dropdirectory_admin | No inheritance, Cannot login +
| Profile default
enterprisedb | Superuser, Create role, Create DB, Replication, Bypass RLS+
| Profile default
pg_checkpoint | Cannot login +
| Profile default
pg_create_subscription | Cannot login +
| Profile default
pg_database_owner | Cannot login +
| Profile default
pg_execute_server_program | Cannot login +
| Profile default
pg_maintain | Cannot login +
| Profile default
pg_monitor | Cannot login +
| Profile default
pg_read_all_data | Cannot login +
| Profile default
pg_read_all_settings | Cannot login +
| Profile default
pg_read_all_stats | Cannot login +
| Profile default
pg_read_server_files | Cannot login +
| Profile default
pg_signal_backend | Cannot login +
| Profile default
pg_stat_scan_tables | Cannot login +
| Profile default
pg_use_reserved_connections | Cannot login +
| Profile default
pg_write_all_data | Cannot login +
| Profile default
pg_write_server_files | Cannot login +
| Profile default
postgres=#
postgres=# \dn
List of schemas
Name | Owner
--------+-------------------
public | pg_database_owner
(1 row)
postgres=# \dnS
List of schemas
Name | Owner
--------------------+-------------------
information_schema | enterprisedb
pg_catalog | enterprisedb
pg_temp_0 | enterprisedb
pg_toast | enterprisedb
pg_toast_temp_0 | enterprisedb
public | pg_database_owner
sys | enterprisedb
(7 rows)
postgres=# \dnS+
List of schemas
Name | Owner | Access privileges | Description
--------------------+-------------------+----------------------------------------+----------------------------------
information_schema | enterprisedb | enterprisedb=UC/enterprisedb +|
| | =U/enterprisedb |
pg_catalog | enterprisedb | enterprisedb=UC/enterprisedb +| system catalog schema
| | =U/enterprisedb |
pg_temp_0 | enterprisedb | |
pg_toast | enterprisedb | | reserved schema for TOAST tables
pg_toast_temp_0 | enterprisedb | |
public | pg_database_owner | pg_database_owner=UC/pg_database_owner+| standard public schema
| | =U/pg_database_owner |
sys | enterprisedb | enterprisedb=UC/enterprisedb +| sys schema
| | =U/enterprisedb |
(7 rows)
postgres=#
Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using.
Thank you
Rajasekhar Amudala