Re: pg_plan_advice
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Jacob Champion <jacob.champion@enterprisedb.com>
Cc: Dian Fay <di@nmfay.com>, Matheus Alcantara <matheusssilv97@gmail.com>, Jakub Wartak <jakub.wartak@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-15T20:06:08Z
Lists: pgsql-hackers
Attachments
- v7-0001-Store-information-about-range-table-flattening-in.patch (application/octet-stream)
- v7-0003-Store-information-about-Append-node-consolidation.patch (application/octet-stream)
- v7-0002-Store-information-about-elided-nodes-in-the-final.patch (application/octet-stream)
- v7-0004-Allow-for-plugin-control-over-path-generation-str.patch (application/octet-stream)
- v7-0005-WIP-Add-pg_plan_advice-contrib-module.patch (application/octet-stream)
Here's v7. In 0001, I removed "const" from a node's struct declaration, because Tom gave me some feedback to avoid that on another recent patch, and I noticed I had done it here also. 0002, 0003, and 0004 are unchanged. In 0005: - Refactored the code to avoid issuing SEMIJOIN_NON_UNIQUE() advice in cases where uniqueness wasn't actually considered. - Adjusted the code not to issue NO_GATHER() advice for non-relation RTEs. (This is the issue reported by Ajay Pal in a recent message to this thread, which was also mentioned in an XXX in the code.) - Reject zero-length delimited identifiers, per Jacob's email. - Properly initialize element->indexes in pgpa_trove_add_to_hash, per Jacob'e email. - Add gather((d d/d.d)) test case, per Jacob, and fix the related bug in pgpa_identifier_matches_target, per Jacob's email. - Add EXPLAIN SELECT 1 after various test cases in syntax.sql, to improve test coverage, per analysis of why the existing test case didn't catch a bug previously reported by Jacob. - Added a dummy initialization to pgpa_collector.c to placate nervous compilers, per discussion with Jacob. I think this mostly catches me up on responding to issues reported here, although there is one thing reported to me off-list that I haven't dealt with yet. If there's anything reported on thread that isn't addressed here, let me know. Thanks, -- Robert Haas EDB: http://www.enterprisedb.com