Re: BASH script for collecting analyze-related info

From: Craig James <cjames(at)emolecules(dot)com>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: BASH script for collecting analyze-related info
Date: 2013-09-29 16:57:15
Message-ID: CAFwQ8rcd9nWobsNG_754sMbY0bGYOKs3z1VG16irdB=i6tTiMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Sun, Sep 29, 2013 at 2:09 AM, Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> wrote:

> 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!
>

It's the blank line on line 26. Put a backslash on that line or delete it
entirely.

Craig

>
>
> --
> AGENCY Software
> A data system that puts you in control
> 100% Free Software
> *http://agency-software.org/*
> ken(dot)tanzer(at)agency-software(dot)org
> (253) 245-3801
>
> Subscribe to the mailing list<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe>
> to
> learn more about AGENCY or
> follow the discussion.
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>
>

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Ken Tanzer 2013-09-29 21:24:52 Re: BASH script for collecting analyze-related info
Previous Message Ken Tanzer 2013-09-29 09:09:07 BASH script for collecting analyze-related info