Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-22 Thread Jim C. Nasby
On Thu, Apr 21, 2005 at 01:06:13AM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > I'm not sure how different it is from vacuum full, though the main idea > > is that instead of locking the table you instead work in smaller pieces > > and don't block anything other than othe

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-22 Thread Jim C. Nasby
All the issues brought up are why I'm not in favor of trying to do this outside of the backend. On Fri, Apr 22, 2005 at 11:29:27AM +0800, Qingqing Zhou wrote: > > > > 2) Is it possible to write a where clause that can efficiently hit only > > > the tuples in the end of the table? If there is a w

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-21 Thread Qingqing Zhou
> > 2) Is it possible to write a where clause that can efficiently hit only > > the tuples in the end of the table? If there is a way, then I could > > test the idea without writing any code at all. > > Not sure, but you could try using the ctid column. > An alternative is to do a bulky ordered

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-21 Thread Alvaro Herrera
On Thu, Apr 21, 2005 at 08:53:33PM -0400, Paul Tillotson wrote: > 1) Does an update always go to the FSM to find out where to put the new > tuple, or does it first try to put it in the current page, and only read > the FSM if the current page is already full? The latter. > 2) Is it possible to w

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-21 Thread Paul Tillotson
Jim C. Nasby wrote: On Wed, Apr 20, 2005 at 08:10:23PM -0400, Paul Tillotson wrote: P. S. The last time I thought about it, I decided that the best solution is probably one that works just like vacuum full except that it scans the table in reverse order. It would do something like this: - Wa

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-21 Thread Paul Tillotson
Tom Lane wrote: "Jim C. Nasby" <[EMAIL PROTECTED]> writes: I'm not sure how different it is from vacuum full, though the main idea is that instead of locking the table you instead work in smaller pieces and don't block anything other than other updates. We don't have any support for locking

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-20 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > I'm not sure how different it is from vacuum full, though the main idea > is that instead of locking the table you instead work in smaller pieces > and don't block anything other than other updates. We don't have any support for locking sections of a ta

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-20 Thread Jim C. Nasby
On Wed, Apr 20, 2005 at 08:10:23PM -0400, Paul Tillotson wrote: > Jim C. Nasby wrote: > > >I talked to a few people on IRC about this and they didn't think I was > >nuts, so maybe this is something practical... > > > >In a nutshell, my idea is to use the normal transactional/XID code to > >relocat

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-20 Thread Jim C. Nasby
On Wed, Apr 20, 2005 at 07:33:54PM -0400, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > In a nutshell, my idea is to use the normal transactional/XID code to > > relocate tuples in the heap. Think of doing an UPDATE field=field if you > > could tell update what page to put the ne

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-20 Thread Paul Tillotson
Jim C. Nasby wrote: I talked to a few people on IRC about this and they didn't think I was nuts, so maybe this is something practical... In a nutshell, my idea is to use the normal transactional/XID code to relocate tuples in the heap. Think of doing an UPDATE field=field if you could tell update w

Re: [HACKERS] Proposal for background vacuum full/cluster

2005-04-20 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > In a nutshell, my idea is to use the normal transactional/XID code to > relocate tuples in the heap. Think of doing an UPDATE field=field if you > could tell update what page to put the new tuple on. Using this > mechanism, you can move tuples from the e