Skip to content

Commit

Permalink
script updated to avoid issues when running in the customer environment
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 28, 2022
1 parent 0a9f32a commit 8f9d5ab
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions postgres-size-report
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,21 @@ cd ~postgres
echo ""
echo "************* Candlepin Tablesizes *************"
echo ""
echo $TABLEQUERY | sudo -u postgres psql -d candlepin

echo $TABLEQUERY | su - postgres -c "psql candlepin"

echo ""
echo "************** Foreman Tablesizes **************"
echo ""
echo $TABLEQUERY | sudo -u postgres psql -d foreman

echo $TABLEQUERY | su - postgres -c "psql foreman"

if PULPCORE_TABLESIZES=$(echo $TABLEQUERY | sudo -u postgres psql -d pulpcore 2>/dev/null)
if PULPCORE_TABLESIZES=$(echo $TABLEQUERY | su - postgres -c "psql pulpcore" 2>/dev/null)
then
echo ""
echo "************** Pulpcore Tablesizes *************"
echo ""
echo "$PULPCORE_TABLESIZES"
fi


echo ""
echo "*************** FileSystem Usage ***************"
echo ""
Expand Down

0 comments on commit 8f9d5ab

Please sign in to comment.