Greenplum 5.7 + Gp_toolkit

Source: Internet
Author: User
Tags psql reserved centos

The

Gp_toolkit is a functional schema for Greenplum. Contains a number of useful functions.

[Gpadmin@node1 gpseg-1]$ psql-d peiybdb psql (8.3.23) Type ' help ' for help.  peiybdb=# \dns+ List of schemas Name | Owner |                         Access Privileges | Description--------------------+---------+--------------------+--------------------------------- ----------------------------Gp_toolkit | Gpadmin | 
                              Gpadmin=uc/gpadmin | : =u/gpadmin Information_schema | Gpadmin | 
                              Gpadmin=uc/gpadmin | : =u/gpadmin pg_aoseg |                    Gpadmin | | Reserved schema for Append only segment list and EOF Tables Pg_bitmapindex |                    Gpadmin | | Reserved schema for internal relations of bitmap indexes Pg_catalog | Gpadmin | Gpadmin=uc/gpadmin | System catalog Schema: =u/gpadmin pg_toast |              Gpadmin |      | Reserved schema for toasts tables public | Gpadmin | Gpadmin=uc/gpadmin |
 Standard Public Schema: =uc/gpadmin (7 rows)
Gp_toolkit.gp_log_system

All logs, which are actually an external table, list the contents of all segment, Master Csvlog

peiybdb=# select * from Gp_toolkit.gp_log_system;
Gp_toolkit.gp_log_database

Current database log

peiybdb=# select * from Gp_toolkit.gp_log_database;
Gp_toolkit.gp_disk_free

Disk conditions for Segment nodes

peiybdb=# select * from Gp_toolkit.gp_disk_free;
 dfsegment | Dfhostname |         Dfdevice         | dfspace  
-----------+------------+--------------------------+----------
         0 |  Node2     |  /dev/mapper/centos-root | 10183304
         1 |  Node3     |  /dev/mapper/centos-root | 10183736
(2 rows)
gp_toolkit.gp_stats_missing

Tables that do not collect statistical information

peiybdb=# select * from gp_toolkit.gp_stats_missing;
 Smischema | smitable | Smisize | Smicols | Smirecs 
-----------+----------+---------+---------+---------
(0 rows)
Gp_toolkit.gp_bloat_diag

Find the more expansive tables

peiybdb=# select * from Gp_toolkit.gp_bloat_diag;
 Bdirelid | Bdinspname | Bdirelname | Bdirelpages | bdiexppages |              Bdidiag               
----------+------------+------------+-------------+-------------+---------------------------------- --
     2618 | pg_catalog | pg_rewrite          | |           5 | Moderate amount of bloat suspected
(1 row)
gp_toolkit.gp_bloat_expected_pages

Find out the expansion details for all objects

peiybdb=# select * from Gp_toolkit.gp_bloat_expected_pages;
 Btdrelid | Btdrelpages | Btdexppages 
----------+-------------+-------------
     2620 |           1 |           2
     1260 |           1 |           2
     1255 |          |
    11840 |           1 |           2

Reference:
Https://greenplum.org/docs/570/common/gpdb-features.html
Https://gpdb.docs.pivotal.io/570/main/index.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.