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: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: Vacuum now uses AccessShareLock for analyze |
Date: | 2000-05-29 17:54:18 |
Message-ID: | 200005291754.NAA17962@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> > How separate do people want vacuum and analyze? Analyze currently does
> > not record the number of tuples and pages, because vacuum does that. Do
> > people want analyze as a separate command and in a separate file?
>
> We definitely want a separate command that can invoke just the analyze
> part. I'd guess something like "ANALYZE [ VERBOSE ] optional-table-name
> (optional-list-of-columns)" pretty much like VACUUM.
OK.
>
> I would be inclined to move the code out to a new file, just because
> vacuum.c is so darn big, but that's purely a code-beautification issue.
Done.
>
> On the number of tuples/pages issue, I'd suggest removing that function
> from plain vacuum and make the analyze part do it instead. It's always
> made me uncomfortable that vacuum needs to update system relations while
> it's holding an exclusive lock on the table-being-vacuumed (which might
> be another system catalog, or even pg_class itself). It works, more or
> less, but that update-tuple-in-place code is awfully ugly and
> fragile-looking. I'm also worried that there could be deadlock
> scenarios between concurrent vacuums (eg, one guy working on pg_class,
> another on pg_statistic, both need to get in and update the other guy's
> table. Oops. That particular problem should be gone with your changes,
> but maybe there are still problems just from the need to update
> pg_class).
How do I find the number of pages from heapscan? Can that number just
be computed from the file size. I can get the block number of the last
entry in the scan, but that doesn't show me expired rows at the end.
--
Bruce Momjian | http://www.op.net/~candle
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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-05-29 18:10:19 | Re: Configuration and build clean-up |
Previous Message | Bruce Momjian | 2000-05-29 17:52:07 | Re: Re: Additional system indexes |