Skip to content

Generate the locks wait-for graph for Greenplum 4.x, 5.x, 6.x, 7.x~

License

Notifications You must be signed in to change notification settings

hidva/waitforgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A utility used for generating locks wait-for graph for Greenplum Database

# Use PG* environment variables (PGDATABASE, PGUSER, ...) as connection information by default
waitforgraph > wfg.dot
dot -T svg < wfg.dot > wfg.svg
# also support Connection String described in https://www.postgresql.org/docs/current/libpq-connect.html
waitforgraph dbname=DATABASENAME | dot -T svg > wfg.svg
open wfg.svg
waitforgraph > wfg.dot
# Sometimes we are only interested in one subgraph of the graph.
# And 2018128 is the start point of subgraph.
grep -F -- '->' wft.dot | subgraph 20181218 > wfg.subgraph.dot
dot -T svg < wfg.subgraph.dot > wfg.subgraph.svg
open wfg.subgraph.svg

The locks wait-for graph looks as follow:

gdd.dot

There is more detailed information in the dot file:

strict digraph G {
label="WaitForGraph - Generated By hidva/waitforgraph";
29968;
29970;
29970 -> 29968
}
/*大吉大利~
session 29970 waits for AccessShareLock on locktype=relation,gp_segment_id=-1,database=10902,relation=16395; blocked by session 29968(granted AccessExclusiveLock);
*/

About

Generate the locks wait-for graph for Greenplum 4.x, 5.x, 6.x, 7.x~

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages