About "Our CLUSTER implementation is pessimal" patch - Mailing list pgsql-hackers

From Leonardo F
Subject About "Our CLUSTER implementation is pessimal" patch
Date
Msg-id 42957.48433.qm@web29016.mail.ird.yahoo.com
Whole thread Raw
Responses Re: About "Our CLUSTER implementation is pessimal" patch  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: About "Our CLUSTER implementation is pessimal" patch  (Leonardo F <m_lists@yahoo.it>)
List pgsql-hackers
Hi,

I read the thread "Our CLUSTER implementation is pessimal"
http://archives.postgresql.org/pgsql-hackers/2008-08/msg01371.php. 

I would like to try/integrate that patch as we use CLUSTER a lot on our system.

I was going to try to add the proper cost_index/cost_sort calls to decide which "path" should be executed, as in:

http://archives.postgresql.org/pgsql-hackers/2008-09/msg00517.php

I don't think it will be easy without help... I'll ask here a lot I'm afraid...

About that patch:

1) would it be possible to use the tuplesort_*tupleslot set of functions instead of writing new ones for HeapTuple?
Thatis: is it that difficult/impossible/nonsense to construct TupleTableSlot from HeapTuple and use those? 

2) The patch doesn't check "HeapTupleSatisfiesVacuum" before passing it to tuplesort_putrawtuple: would it be
reasonableto check the "isdead" flag before calling tuplesort_putrawtuple for each tuple? 


Sorry if I talked nonsense...



Leonardo





pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: New XLOG record indicating WAL-skipping
Next
From: Heikki Linnakangas
Date:
Subject: Re: About "Our CLUSTER implementation is pessimal" patch