Re: Vacuum summary?

Lists: pgsql-hackers
From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Vacuum summary?
Date: 2005-07-11 19:10:41
Message-ID: 42D2C431.2020606@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello,

What do you guys think of having a vacuum summary command? E.g.;

VACUUM [FULL] [ANALYZE] SUMMARY

where summary would only print the last lines of a vacuum verbose?

foo=> VACUUM SUMMARY;
INFO: free space map contains 17 pages in 12 relations
DETAIL: A total of 192 page slots are in use (including overhead).
192 page slots are required to track all free space.
Current limits are: 20000 page slots, 1000 relations, using 182 KB.
VACUUM
foo=>

Sincerely,

Joshua D. Drake

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum summary?
Date: 2005-07-11 19:21:35
Message-ID: 11505.1121109695@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> What do you guys think of having a vacuum summary command? E.g.;

> VACUUM [FULL] [ANALYZE] SUMMARY

... that will turn SUMMARY into a fully reserved word ...

regards, tom lane


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum summary?
Date: 2005-07-11 19:38:05
Message-ID: 42D2CA9D.7090501@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
>
>>What do you guys think of having a vacuum summary command? E.g.;
>
>
>>VACUUM [FULL] [ANALYZE] SUMMARY
>
>
> ... that will turn SUMMARY into a fully reserved word ...

Hmmm... good point. Other options would be:

brief
short
terse?
nutshell ;)
review
report -- This one is interesting although sufffers from the same problem.

Sincerely,

Joshua D. Drake

>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum summary?
Date: 2005-07-12 06:47:42
Message-ID: 1121150862.3970.98.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Mon, 2005-07-11 at 12:38 -0700, Joshua D. Drake wrote:
> Tom Lane wrote:
> > "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> >
> >>What do you guys think of having a vacuum summary command? E.g.;
> >
> >
> >>VACUUM [FULL] [ANALYZE] SUMMARY
> >
> >
> > ... that will turn SUMMARY into a fully reserved word ...
>
> Hmmm... good point. Other options would be:
>
> brief
> short
> terse?
> nutshell ;)
> review
> report -- This one is interesting although sufffers from the same problem.
>

Good idea. I think its a good idea to make that info easily accessible.

How about putting this in the logfile, without any command changes?

Best Regards, Simon Riggs


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum summary?
Date: 2005-07-12 21:53:44
Message-ID: 26861.1121205224@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> On Mon, 2005-07-11 at 12:38 -0700, Joshua D. Drake wrote:
>>> What do you guys think of having a vacuum summary command? E.g.;

> How about putting this in the logfile, without any command changes?

Actually, tying it to VACUUM might not have been such a great idea in
the first place. I think I did that because (a) the info is more likely
to be up to date just after a VACUUM (though when you consider an entire
installation rather than just one DB, this argument has big holes); and
(b) people were already accustomed to seeing a lot of blather from a
VACUUM VERBOSE command.

It'd be relatively easy I think to extract the current FSM statistics
in a function that could be invoked separately from VACUUM. Not sure
how we ought to return 'em though --- the VACUUM way of a bunch of INFO
messages is a bit old-fashioned. Maybe a statistics view?

regards, tom lane


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum summary?
Date: 2005-07-12 21:56:08
Message-ID: 42D43C78.7000909@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


> It'd be relatively easy I think to extract the current FSM statistics
> in a function that could be invoked separately from VACUUM. Not sure
> how we ought to return 'em though --- the VACUUM way of a bunch of INFO
> messages is a bit old-fashioned. Maybe a statistics view?

That would work for me.

>
> regards, tom lane

--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum summary?
Date: 2005-07-13 08:29:53
Message-ID: 1121243393.3970.122.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, 2005-07-12 at 14:56 -0700, Joshua D. Drake wrote:
> > It'd be relatively easy I think to extract the current FSM statistics
> > in a function that could be invoked separately from VACUUM. Not sure
> > how we ought to return 'em though --- the VACUUM way of a bunch of INFO
> > messages is a bit old-fashioned. Maybe a statistics view?
>
> That would work for me.

Sounds good.

I would also like the statistics view to show when all the FSM tracked
pages are used up for a particular relation and the relation needs
vacuuming. That way we can integrate it with autovacuum.

Best Regards, Simon Riggs


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum summary?
Date: 2005-07-30 03:21:19
Message-ID: 200507300321.j6U3LJV12656@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Added to TODO:

* Add system view to show free space map contents

---------------------------------------------------------------------------

Simon Riggs wrote:
> On Tue, 2005-07-12 at 14:56 -0700, Joshua D. Drake wrote:
> > > It'd be relatively easy I think to extract the current FSM statistics
> > > in a function that could be invoked separately from VACUUM. Not sure
> > > how we ought to return 'em though --- the VACUUM way of a bunch of INFO
> > > messages is a bit old-fashioned. Maybe a statistics view?
> >
> > That would work for me.
>
> Sounds good.
>
> I would also like the statistics view to show when all the FSM tracked
> pages are used up for a particular relation and the relation needs
> vacuuming. That way we can integrate it with autovacuum.
>
> Best Regards, Simon Riggs
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073