Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: clustering ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 15 Topic 15434 of 16965
Post > Topic >>

Re: clustering without locking

by tgl@[EMAIL PROTECTED] (Tom Lane) May 3, 2008 at 01:27 PM

Craig Ringer <craig@[EMAIL PROTECTED]
> writes:
> Later on, though, less new space would have to be allocated because more

> and more of the space allocated earlier to hold moved tuples would be 
> being freed up in useful chunks that could be reused.

I don't see how that works.  If the minimum size of the table is X
pages, ISTM that the first pass has to push everything up to pages above
X.  You can't put any tem****ary copies in pages <= X because you might
need that space when it comes time to make the clustering happen.  So
the table is going to bloat to (at least) 2X pages.  The extra pages
will be *mostly* empty when you're done, but probably not *entirely*
empty if there have been concurrent insertions --- and you'll never be
able to clean them out without taking exclusive lock.

If you could accurately predict a tuple's final position, you could
maybe get away with putting it tem****arily in a page above that one
but still less than X.  I don't see how you do that though, especially
not in the face of concurrent insertions.  (In fact, given concurrent
insertions I don't even see how to know what X is.)

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
 




 15 Posts in Topic:
clustering without locking
fschmidt@[EMAIL PROTECTED  2008-05-01 17:12:52 
Re: clustering without locking
kleptog@[EMAIL PROTECTED]  2008-05-02 08:18:39 
Re: clustering without locking
scott_ribe@[EMAIL PROTECT  2008-05-02 07:51:57 
Re: clustering without locking
craig@[EMAIL PROTECTED]   2008-05-02 22:09:01 
Re: clustering without locking
scott_ribe@[EMAIL PROTECT  2008-05-02 08:29:28 
Re: clustering without locking
craig@[EMAIL PROTECTED]   2008-05-03 08:21:43 
Re: clustering without locking
tgl@[EMAIL PROTECTED] (T  2008-05-02 20:41:35 
Re: clustering without locking
craig@[EMAIL PROTECTED]   2008-05-03 09:53:55 
Re: clustering without locking
tgl@[EMAIL PROTECTED] (T  2008-05-03 13:27:14 
Re: clustering without locking
craig@[EMAIL PROTECTED]   2008-05-04 02:19:14 
Re: clustering without locking
tgl@[EMAIL PROTECTED] (T  2008-05-03 14:33:18 
Re: clustering without locking
craig@[EMAIL PROTECTED]   2008-05-04 03:04:56 
Re: clustering without locking
tgl@[EMAIL PROTECTED] (T  2008-05-02 10:51:07 
Re: clustering without locking
scott_ribe@[EMAIL PROTECT  2008-05-02 09:08:41 
Re: clustering without locking
masao.fujii@[EMAIL PROTEC  2008-05-02 16:11:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 7:54:56 CDT 2008.