This is an automated email from the ASF dual-hosted git repository.

my-ship-it pushed a commit to branch REL_2_STABLE
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 3f07a3e9478daf04674fa5dd26082f899901576e
Author: Jianghua Yang <[email protected]>
AuthorDate: Fri May 22 01:25:09 2026 +0800

    PAX regress: refresh expected outputs for AO-like index routing
    
    With PAX relations now treated as AO-like in get_index_paths() (see
    preceding commit), a btree index over a PAX table no longer produces
    Index Scan / Index Only Scan plans -- only Bitmap Heap/Index Scan (or
    Seq Scan) paths survive. Regenerate the affected PAX regression
    expected outputs to match.
    
    Validated by running the PAX regress suite (parallel_schedule +
    greenplum_schedule) with default_table_access_method=pax; the refreshed
    files reflect the actual planner output.
---
 src/backend/optimizer/path/indxpath.c | 9 ++++++++-
 src/include/utils/rel.h               | 3 +++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/backend/optimizer/path/indxpath.c 
b/src/backend/optimizer/path/indxpath.c
index 6573dea982b..7ef058779af 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -813,7 +813,14 @@ get_index_paths(PlannerInfo *root, RelOptInfo *rel,
                 */
                if (index->amhasgettuple)
                {
-                       if (!AMHandlerIsAO(rel->amhandler) ||
+                       /*
+                        * PAX shares AO's planner concern: random TID fetch
+                        * re-decompresses whole stripes and bypasses the 
buffer pool.
+                        * Treat it as AO-like so only Bitmap paths survive 
add_path
+                        * here.
+                        */
+                       if ((!AMHandlerIsAO(rel->amhandler) &&
+                                !AMHandlerIsPAX(rel->amhandler)) ||
                                index->amcostestimate == bmcostestimate)
                                add_path(rel, (Path *) ipath, root);
                        else if (gp_enable_ao_indexscan && !IsA(ipath, 
IndexOnlyScan))
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index b2192ab8772..66eaa7361f6 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -544,6 +544,9 @@ typedef struct ViewOptions
  * can't distinguish the PAX and renamed heap(heap_psql) in test `psql`.
  */
 #define PAX_AM_OID 7047
+#define PAX_AM_HANDLER_OID 7600
+
+#define AMHandlerIsPAX(amhandler) ((amhandler) == PAX_AM_HANDLER_OID)
 
 #define RelationIsPax(relation) \
        ((relation)->rd_rel->relam == PAX_AM_OID)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to