aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/cluster.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-04-13 19:18:14 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-04-13 19:18:14 +0000
commit24558da14a26337e945732d3b435b07edcbb6733 (patch)
tree7a6fbd12b1793e46d4584f49a1bc9373300125d8 /src/backend/commands/cluster.c
parentc22ed3d523782c43836c163c16fa5a7bb3912826 (diff)
downloadpostgresql-24558da14a26337e945732d3b435b07edcbb6733.tar.gz
postgresql-24558da14a26337e945732d3b435b07edcbb6733.zip
Phase 2 of project to make index operator lossiness be determined at runtime
instead of plan time. Extend the amgettuple API so that the index AM returns a boolean indicating whether the indexquals need to be rechecked, and make that rechecking happen in nodeIndexscan.c (currently the only place where it's expected to be needed; other callers of index_getnext are just erroring out for now). For the moment, GIN and GIST have stub logic that just always sets the recheck flag to TRUE --- I'm hoping to get Teodor to handle pushing that control down to the opclass consistent() functions. The planner no longer pays any attention to amopreqcheck, and that catalog column will go away in due course.
Diffstat (limited to 'src/backend/commands/cluster.c')
-rw-r--r--src/backend/commands/cluster.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index b83a0999254..0c83e237fe8 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.172 2008/03/26 21:10:37 alvherre Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/cluster.c,v 1.173 2008/04/13 19:18:14 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -776,6 +776,10 @@ copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex)
CHECK_FOR_INTERRUPTS();
+ /* Since we used no scan keys, should never need to recheck */
+ if (scan->xs_recheck)
+ elog(ERROR, "CLUSTER does not support lossy index conditions");
+
LockBuffer(scan->xs_cbuf, BUFFER_LOCK_SHARE);
switch (HeapTupleSatisfiesVacuum(tuple->t_data, OldestXmin,