remove diskquota on Tanzu Greenplum
search cancel

remove diskquota on Tanzu Greenplum

book

Article ID: 296622

calendar_today

Updated On:

Products

VMware Tanzu Greenplum

Issue/Introduction

The Customer is receiving an error "Share memory is not enough for active tables." on gpdb 6.11 or lower


Environment

Product Version: 6.11

Resolution

Known issue:    30980 - diskquota Module

Resolved an issue that caused master and mirror segments to display the warning, Share memory is not enough for active tables, when TRUNCATE and CREATE TABLE statements were executed.

A permanent resolution is in 6.12, schedule an upgrade to fix it

Workaround: Removing diskquota extension

1.  First go through all databases and check which one have extension installed

To check if the database has a diskquote check the extension:

\c testdb
testdb=# select * from pg_extension ;
  extname  | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
-----------+----------+--------------+----------------+------------+-----------+--------------
 plpgsql   |       10 |           11 | f              | 1.0        |           |
 diskquota |       10 |         2200 | t              | 1.0        | {75354}   | {""}
(2 rows)

\c gpadmin
gpadmin=# select * from pg_extension ;
 extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
---------+----------+--------------+----------------+------------+-----------+--------------
 plpgsql |       10 |           11 | f              | 1.0        |           |
(1 row) 


As you see in example above the testdb has a diskquota and gpadmin database does not.  

2.  For each database that has a diskqouta:

\c <database>
SELECT * FROM diskquota.show_fast_schema_quota_view;   // optionally take a backup of current settings
SELECT * FROM diskquota.show_fast_role_quota_view;     // optionally take a backup of current settings
DROP EXTENSION diskquota; 

 

Repeat this step for every database that you find it has diskquota 

3. Remove diskquota from shared_preload_libraries (make sure not to remove other extensions)

[gpadmin@gpmdw ~]$ gpconfig -s shared_preload_libraries
Values on all segments are consistent
GUC          : shared_preload_libraries
Master  value: metrics_collector,diskquota
Segment value: metrics_collector,diskquota

[gpadmin@gpmdw ~]$ gpconfig -c shared_preload_libraries -v 'metrics_collector'
20220111:13:09:43:003521 gpconfig:gpmdw:gpadmin-[INFO]:-completed successfully with parameters '-c shared_preload_libraries -v metrics_collector' 

 

4. Restart the database and check extension

[gpadmin@gpmdw ~]$ gpconfig -s shared_preload_libraries
Values on all segments are consistent
GUC          : shared_preload_libraries
Master  value: metrics_collector
Segment value: metrics_collecto 

 

5. Drop database diskquota

DROP DATABASE diskquota;