Re: table size growing out of control

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jan Wieck <JanWieck(at)Yahoo(dot)com>, Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: table size growing out of control
Date: 2002-07-17 19:57:09
Message-ID: 200207171957.g6HJv9d26931@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> > Tom Lane wrote:
> >> Good point. What do people think of making the pg_stat_activity view do
> >> COALESCE(current_query, '<unknown>')
> >> so that there's a clear flag that you're not seeing anything?
>
> > Shouldn't be done on the view. The builtin function used to extract that
> > information from the stats file can do it much better.
>
> No, I think the view is exactly the right place to do it. If we do it
> in the function then we are forcing a UI-prettiness issue onto
> applications that may not want it; but they'll have no way to bypass it.
>
> > So it could return <permission denied> or similar in that case to
> > distinguish.
>
> I don't think it's all that important to distinguish the reason why
> you're not seeing it. Returning NULL from the function is a perfectly
> good convention at the level of the function.

I think you do need to distinguish "permission denied" from "not
enabled". I think our "not enabled" status for this feature is
confusing enough for you have to report is separately.

You could return "permission denied or not enabled", I guess. In fact,
I would put the text in parens, then apps can know that strings in
quotes are errors, but of course, if they issue "(select * from
pg_class)" there are problems. Maybe "-- permission denied".

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben Liblit 2002-07-17 19:59:42 Re: dropping anonymous constraints
Previous Message Mark Zieg 2002-07-17 19:39:29 \d [index_name] bug?