Re: Two proposals of DBA helper functions

From: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
To: Jean-Paul Argudo <jean-paul(at)argudo(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Two proposals of DBA helper functions
Date: 2006-09-25 18:53:57
Message-ID: 20060925185357.GA19827@nasby.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 25, 2006 at 09:29:28AM +0200, Jean-Paul Argudo wrote:
> Hi all,
>
> I would like to submit two ideas:
>
> 1/
> In the daily tasks I have as (also) a standard DBA, I found usefull to
> view locks in a human point of view. I think the "~ '^pg_'" part of the
> queries may be not so clean... Any ideas welcome :)

Technically, you need to look and see what schema something is in. Take
a look at how the newsysviews project on pgFoundry does it.

> 2/
> Also, I like having a cache hit/miss ratio. This is why I add a function
> "pg_stat_get_db_hit_miss_ratio(database oid)" to pg_stat_database, in a
> "bis" view.
>
> Since I dont want to flood the mailing list with a possible useless
> thing, I put my sql/plpgsql code here:
>
> http://priam.dalibo.net/~jpa/propositions/
>
> Please take a look at it and tell me if this could be usefull or not..

The general consensus seems to be that the things in pg_catalog should
provide a minimalist view. The newsysviews project was created in the
hope that we could get a more human-friendly version of that data put
into core, but it's been neglected for a while now (for one thing, there
was desire to make it look more like information_schema).
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2006-09-25 19:16:13 pg_dump data in BKI format
Previous Message Neil Conway 2006-09-25 18:50:21 Re: Broken link in PG docs