Recently I have created a github repository for Greenplum and PostgreSQL DBA’s to simplify day to day activities. It includes dotfiles, Shell scripts, Python scripts and SQL scripts. Few of them I have created myself and few I have copied from somewhere on Internet.
You can visit this link and see or contribute to this repository.
How to install:
First you should check if you have git installed. You can check it using below command:
which git
It should give you the path for git command. If not, You can install it using by following this guide.
Once you have git installed run below commands step by step.
mkdir $HOME/git
cd $HOME/git
git clone https://github.com/pgyogesh/greenplum_dba.git
cd greenplum
chmod +x install.sh
./install.sh
It will take some time to install completely as this will download few repositories related to vim integration but you don’t have to worry about this install.sh will take care of this. You can seat back and relax :)
Features:
All required environment exports
Aliases to make work easier
Python autocomplete for vim
Python Script to get notified through email with waiters and blockers information if queries are in waiting state more that 10 minutes (Using gmail,outlook etc)
Shell script to get notified through email with waiters and blockers information if queries are in waiting state more that 10 minutes (Using Unix Mail Utility)
Shell script to archive the GPDB log files in pg_log/YEAR/MONTH directory
Greenplum Utility like logging using gplog.py from gpdb source code.
And More…
Have a issue..? Please raise here
Here is installation demo;
Note: In above demo you will see repo name greenplum but later I have renamed it to greenplum_dba for some reasons.