Re: [HACKERS] Vacuum improvement

2002-10-16 Thread Robert Treat
On Wed, 2002-10-16 at 12:33, David Walker wrote: > Vacuum full locks the whole table currently. I was thinking if you used a > similar to a hard drive defragment that only 2 rows would need to be locked > at a time. When you're done vacuum/defragmenting you shorten the file to > discard the d

Re: [HACKERS] Vacuum improvement

2002-10-16 Thread Greg Copeland
But doesn't the solution I offer present a possible work around? The table wouldn't need to be locked (I think) until the first dead tuple were located. After that, you would only keep the locks until you've scanned X% of the table and shrunk as needed. The result, I think, results in increment

Re: [HACKERS] Vacuum improvement

2002-10-16 Thread David Walker
Vacuum full locks the whole table currently. I was thinking if you used a similar to a hard drive defragment that only 2 rows would need to be locked at a time. When you're done vacuum/defragmenting you shorten the file to discard the dead tuples that are located after your useful data. Ther

Re: [HACKERS] Vacuum improvement

2002-10-16 Thread Greg Copeland
On Wed, 2002-10-16 at 02:29, Gavin Sherry wrote: > On 16 Oct 2002, Hannu Krosing wrote: > > > On Wed, 2002-10-16 at 05:22, Gavin Sherry wrote: > > > Hi all, > > > > > > I'm thinking that there is an improvement to vacuum which could be made > > > for 7.4. VACUUM FULLing large, heavily updated ta

Re: [HACKERS] Vacuum improvement

2002-10-16 Thread Tom Lane
Hannu Krosing <[EMAIL PROTECTED]> writes: > meaning to VACUUM FULL the whole table, but to work in small chunks and > relaese all locks and let others access the tables between these ? AFAICS this is impossible for VACUUM FULL. You can't let other accesses in and then resume processing, because

Re: [HACKERS] Vacuum improvement

2002-10-16 Thread Gavin Sherry
On 16 Oct 2002, Hannu Krosing wrote: > On Wed, 2002-10-16 at 05:22, Gavin Sherry wrote: > > Hi all, > > > > I'm thinking that there is an improvement to vacuum which could be made > > for 7.4. VACUUM FULLing large, heavily updated tables is a pain. There's > > very little an application can do t

Re: [HACKERS] Vacuum improvement

2002-10-15 Thread Hannu Krosing
On Wed, 2002-10-16 at 05:22, Gavin Sherry wrote: > Hi all, > > I'm thinking that there is an improvement to vacuum which could be made > for 7.4. VACUUM FULLing large, heavily updated tables is a pain. There's > very little an application can do to minimise dead-tuples, particularly if > the tabl

Re: [HACKERS] Vacuum improvement

2002-10-15 Thread Alvaro Herrera
On Tue, Oct 15, 2002 at 11:52:35PM -0400, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > have a parameter which specified how much of the table is vacuumed. That > > is, you could specify: > > VACUUM FULL test 20 precent; > > Erm ... but which 20 percent? In other words, how coul

Re: [HACKERS] Vacuum improvement

2002-10-15 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > have a parameter which specified how much of the table is vacuumed. That > is, you could specify: > VACUUM FULL test 20 precent; Erm ... but which 20 percent? In other words, how could you arrange for repeated applications of such a command to cover the

Re: [HACKERS] Vacuum improvement

2002-10-15 Thread Greg Copeland
That a good idea. That way, if your database slows during specific windows in time, you can vacuum larger sizes, etc. Seemingly would help you better manage your vacuuming against system loading. Greg On Tue, 2002-10-15 at 19:22, Gavin Sherry wrote: > Hi all, > > I'm thinking that there is a