]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
pg_plan_advice: Fix variable type confusion.
authorRobert Haas <rhaas@postgresql.org>
Tue, 17 Mar 2026 14:20:15 +0000 (10:20 -0400)
committerRobert Haas <rhaas@postgresql.org>
Tue, 17 Mar 2026 15:34:26 +0000 (11:34 -0400)
pgs_mask values should always be uint64, but in a couple of
places I incorrectly used uint32. Fix that.

Reported-by: David Rowley <dgrowleyml@gmail.com>
Discussion: http://postgr.es/m/CAApHDvquH6wnp4fhpaCOkC4R3KAvr2BOTbhhDPDQCBNR3YbLMQ@mail.gmail.com

contrib/pg_plan_advice/pgpa_planner.c

index 5508b8af7076fc350bfc3a47f766b9eb1a947935..c05d549dd1d4174d3f4f070efcec9759323d787b 100644 (file)
@@ -996,7 +996,7 @@ pgpa_planner_apply_join_path_advice(JoinType jointype, uint64 *pgs_mask_p,
        Bitmapset  *jo_deny_rel_indexes = NULL;
        Bitmapset  *jm_indexes = NULL;
        bool            jm_conflict = false;
-       uint32          join_mask = 0;
+       uint64          join_mask = 0;
        Bitmapset  *sj_permit_indexes = NULL;
        Bitmapset  *sj_deny_indexes = NULL;
 
@@ -1048,7 +1048,7 @@ pgpa_planner_apply_join_path_advice(JoinType jointype, uint64 *pgs_mask_p,
        while ((i = bms_next_member(pjs->join_indexes, i)) >= 0)
        {
                pgpa_trove_entry *entry = &pjs->join_entries[i];
-               uint32          my_join_mask;
+               uint64          my_join_mask;
 
                /* Handle join order advice. */
                if (entry->tag == PGPA_TAG_JOIN_ORDER)