Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading pg_hint_plan with timescaledb causes pg_hint_plan to output incorrect plan results. #210

Open
abigalekim opened this issue Nov 26, 2024 · 0 comments

Comments

@abigalekim
Copy link

Version of PostgreSQL: 15.3
System: Ubuntu 22.04
Version of pg_hint_plan: Release 15, 1.5.0
Version of TimescaleDB: 2.11.1

An example of test diffs (running pg_hint_plan's pg_regress testing)

--- /home/abigalek/pgext-cli/pgextworkdir/pg_hint_plan-REL15_1_5_0/expected/base_plan.out	2023-01-25 03:40:47.000000000 +0000
+++ /home/abigalek/pgext-cli/pgextworkdir/pg_hint_plan-REL15_1_5_0/results/base_plan.out	2023-10-28 03:24:21.998005780 +0000
@@ -11,28 +11,26 @@
 
 -- query type 2
 EXPLAIN (COSTS false) SELECT * FROM t1, t4 WHERE t1.val < 10;
-               QUERY PLAN                
------------------------------------------
+             QUERY PLAN              
+-------------------------------------
  Nested Loop
-   ->  Bitmap Heap Scan on t1
-         Recheck Cond: (val < 10)
-         ->  Bitmap Index Scan on t1_val
-               Index Cond: (val < 10)
+   ->  Index Scan using t1_val on t1
+         Index Cond: (val < 10)
    ->  Materialize
          ->  Seq Scan on t4
-(7 rows)
+(5 rows)
 
 -- query type 3
 EXPLAIN (COSTS false) SELECT * FROM t3, t4 WHERE t3.id = t4.id AND t4.ctid = '(1,1)';
-                 QUERY PLAN                  
----------------------------------------------
+                  QUERY PLAN                   
+-----------------------------------------------
  Merge Join
    Merge Cond: (t3.id = t4.id)
    ->  Index Scan using t3_pkey on t3
    ->  Sort
          Sort Key: t4.id
-         ->  Seq Scan on t4
-               Filter: (ctid = '(1,1)'::tid)
+         ->  Tid Scan on t4
+               TID Cond: (ctid = '(1,1)'::tid)
 (7 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant