BASH script for collecting analyze-related info

Поиск
Список
Период
Сортировка
От Ken Tanzer
Тема BASH script for collecting analyze-related info
Дата
Msg-id CAD3a31Uah=tszPw6hD8PKdzTpVT6bjT1KsX5ooKPZ69+4gFi+Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: BASH script for collecting analyze-related info  (Craig James <cjames@emolecules.com>)
Re: BASH script for collecting analyze-related info  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-performance
I just sent off to this list for query help, and found the process of gathering all the requested info somewhat tedious.  So I created a little BASH script to try to pull together as much of this information as possible.  

The script reads an analyze file, and generates SQL queries to retrieve the following information:

  • Postgres Version
  • Changes to postgresql.conf
  • Description of all tables scanned
  • Description of all Indices
  • Actual and estimated row counts for all the tables

Hopefully this may be of use to others as well.  This list doesn't include definitions for any views or custom functions--I don't think they're in the analyze output, but if they are please let me know.

Any comments or suggestions for improvement would be most welcome.  Thanks.

Ken

p.s.,  This script runs fine on my computer (Ubuntu 13.04), but on a Fedora 11 machine it dies with 

pg_analyze_info.sh: line 18: unexpected EOF while looking for matching `)'
pg_analyze_info.sh: line 57: syntax error: unexpected end of file

If anyone knows why, or encounters a similar error and fixes it, please let me know!


--
AGENCY Software  
A data system that puts you in control
100% Free Software
(253) 245-3801

learn more about AGENCY or
follow the discussion.
Вложения

В списке pgsql-performance по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Planner performance extremely affected by an hanging transaction (20-30 times)?
Следующее
От: Craig James
Дата:
Сообщение: Re: BASH script for collecting analyze-related info