pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Update obsolete row compare preprocessing comments. 4+ messages / 1 participants [nested] [flat]
* pgsql: Update obsolete row compare preprocessing comments. @ 2025-07-02 16:38 Peter Geoghegan <pg@bowt.ie> 0 siblings, 0 replies; 4+ messages in thread From: Peter Geoghegan @ 2025-07-02 16:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Update obsolete row compare preprocessing comments. Restore nbtree preprocessing comments describing how we mark nbtree row compare members required to how they were prior to 2016 bugfix commit a298a1e0. Oversight in commit bd3f59fd, which made nbtree preprocessing revert to the original 2006 rules, but neglected to revert these comments. Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/9ca30a0b04d751c58d4efa0a2b3073cb285b1bd2 Modified Files -------------- src/backend/access/nbtree/nbtpreprocesskeys.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Update obsolete row compare preprocessing comments. @ 2025-07-02 16:38 Peter Geoghegan <pg@bowt.ie> 0 siblings, 0 replies; 4+ messages in thread From: Peter Geoghegan @ 2025-07-02 16:38 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Update obsolete row compare preprocessing comments. Restore nbtree preprocessing comments describing how we mark nbtree row compare members required to how they were prior to 2016 bugfix commit a298a1e0. Oversight in commit bd3f59fd, which made nbtree preprocessing revert to the original 2006 rules, but neglected to revert these comments. Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4938737d5452fc4975f985a0a6faf43a360ef021 Modified Files -------------- src/backend/access/nbtree/nbtpreprocesskeys.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Update obsolete row compare preprocessing comments. @ 2025-11-29 21:43 Peter Geoghegan <pg@bowt.ie> 0 siblings, 0 replies; 4+ messages in thread From: Peter Geoghegan @ 2025-11-29 21:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Update obsolete row compare preprocessing comments. We have some limited ability to detect redundant and contradictory conditions involving an nbtree row comparison key following commits f09816a0 and bd3f59fd: we can do so in simple cases involving IS NULL and IS NOT NULL keys on a row compare key's first column. We can likewise determine that a scan's qual is unsatisfiable given a row compare whose first subkey's arg is NULL. Update obsolete comments that claimed that we merely copied row compares into the output key array "without any editorialization". Also update another _bt_preprocess_keys header comment paragraph: add a parenthetical remark that points out that preprocessing will generate a skip array for the preceding example qual. That will ultimate lead to preprocessing marking the example's lower-order y key required -- which is exactly what the example supposes cannot happen. Keep the original comment, though, since it accurately describes the mechanical rules that determine which keys get marked required in the absence of skip arrays (which can occasionally still matter). This fixes an oversight in commit 92fe23d9, which added the nbtree skip scan optimization. Author: Peter Geoghegan <pg@bowt.ie> Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c902bd57af998b52bde98c87916190309639129e Modified Files -------------- src/backend/access/nbtree/nbtpreprocesskeys.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Update obsolete row compare preprocessing comments. @ 2025-11-29 21:43 Peter Geoghegan <pg@bowt.ie> 0 siblings, 0 replies; 4+ messages in thread From: Peter Geoghegan @ 2025-11-29 21:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Update obsolete row compare preprocessing comments. We have some limited ability to detect redundant and contradictory conditions involving an nbtree row comparison key following commits f09816a0 and bd3f59fd: we can do so in simple cases involving IS NULL and IS NOT NULL keys on a row compare key's first column. We can likewise determine that a scan's qual is unsatisfiable given a row compare whose first subkey's arg is NULL. Update obsolete comments that claimed that we merely copied row compares into the output key array "without any editorialization". Also update another _bt_preprocess_keys header comment paragraph: add a parenthetical remark that points out that preprocessing will generate a skip array for the preceding example qual. That will ultimate lead to preprocessing marking the example's lower-order y key required -- which is exactly what the example supposes cannot happen. Keep the original comment, though, since it accurately describes the mechanical rules that determine which keys get marked required in the absence of skip arrays (which can occasionally still matter). This fixes an oversight in commit 92fe23d9, which added the nbtree skip scan optimization. Author: Peter Geoghegan <pg@bowt.ie> Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4061992ea83adbfc6b0e4fa202d314ace83a2458 Modified Files -------------- src/backend/access/nbtree/nbtpreprocesskeys.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2025-11-29 21:43 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-07-02 16:38 pgsql: Update obsolete row compare preprocessing comments. Peter Geoghegan <pg@bowt.ie> 2025-07-02 16:38 pgsql: Update obsolete row compare preprocessing comments. Peter Geoghegan <pg@bowt.ie> 2025-11-29 21:43 pgsql: Update obsolete row compare preprocessing comments. Peter Geoghegan <pg@bowt.ie> 2025-11-29 21:43 pgsql: Update obsolete row compare preprocessing comments. Peter Geoghegan <pg@bowt.ie>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox