Skip to main content

Posts

Showing posts from October, 2021

PostgreSQL Daliy | PosgteSQL adninistration

List databases: postgres-# \l                                   List of databases    Name    |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges -----------+----------+----------+-------------+-------------+-----------------------  postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |  template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +            |          |          |             |             | postgres=CTc/postgres  template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +            |          |          |             |             | postgres=CTc/postgres  test      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | (4 rows) Connect to database: postgres-# \connect postgres You are now connected to database "postgres" as user "postgres". List schema: postgres-# \dn[S+]  information_schema | postgres | postgres=UC/postgres+|                     |          | =U/postgres     

Install Postgresql 12.8 on RHEL 7 and Cent OS

Install Postgresql 12.8 on RHEL 7: Download following rpm packages from - https://download.postgresql.org/pub/repos/yum/12/redhat/rhel-7-x86_64/ postgresql12-libs-12.8-1PGDG.rhel7.x86_64.rpm postgresql12-12.8-1PGDG.rhel7.x86_64.rpm postgresql12-server-12.8-1PGDG.rhel7.x86_64.rpm postgresql12-contrib-12.8-1PGDG.rhel7.x86_64 Install rpm packages for Postgresql: # yum install postgresql12-libs-12.8-1PGDG.rhel7.x86_64.rpm # yum install postgresql12-12.8-1PGDG.rhel7.x86_64.rpm # yum install postgresql12-server-12.8-1PGDG.rhel7.x86_64.rpm # yum install postgresql12-contrib-12.8-1PGDG.rhel7.x86_64 It will install following utilities at /usr/pg-sql12/bin clusterdb   dropuser           pg_basebackup  pg_controldata  pg_isready      pg_restore     pg_test_timing  postgresql-12-check-db-dir  reindexdb createdb    initdb             pgbench        pg_ctl          pg_receivewal   pg_rewind      pg_upgrade      postgresql-12-setup         vacuumdb createuser  oid2name   pg_checksums   pg_dump