What is the table pmetrics._gpcc_plannode_history?
search cancel

What is the table pmetrics._gpcc_plannode_history?

book

Article ID: 296621

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

This article discusses the gpmetrics._gpcc_plannode_history table in the gpperfmon database.

This article answers the following questions:

1. What is gpmetrics._gpcc_plannode_history table?

2. What's the relation between gpmetrics._gpcc_plannode_history and gpmetrics.gpcc_plannode_history?

3. Why does relfilenode of gpmetrics._gpcc_plannode_history keep changing?

Environment

Product Version: 6.11

Resolution

gpmetrics._gpcc_plannode_history is an AO table used for GPCC with almost the same data structure as gpmetrics.gpcc_plannode_history except that it is not partitioned.

gpmetrics._gpcc_plannode_history table will regularly copy metrics data from gpcc_exec_x_xxx.dat file on segments and then load the data into gpmetrics.gpcc_plannode_history.

After loading, the table will be truncated causing the change of relfilenode itself and its dependent objects:
gpperfmon=# select oid,relfilenode, relname from pg_class where relname = '_gpcc_plannode_history' or relname like '%33399%'                                                                                                             ;
  oid  | relfilenode |         relname          
-------+-------------+--------------------------
 33399 |       98765 | _gpcc_plannode_history
 33401 |       98766 | pg_toast_33399
 33404 |       98767 | pg_aoseg_33399
 33406 |       98768 | pg_aovisimap_33399
 33403 |       98769 | pg_toast_33399_index
 33408 |       98770 | pg_aovisimap_33399_index
(6 rows)
...
gpperfmon=# select oid,relfilenode, relname from pg_class where relname = '_gpcc_plannode_history' or relname like '%33399%'                                                                                                             ;
  oid  | relfilenode |         relname          
-------+-------------+--------------------------
 33406 |       98774 | pg_aovisimap_33399
 33403 |       98775 | pg_toast_33399_index
 33408 |       98776 | pg_aovisimap_33399_index
 33399 |       98771 | _gpcc_plannode_history
 33401 |       98772 | pg_toast_33399
 33404 |       98773 | pg_aoseg_33399
(6 rows)