
When checking for interleaved partitions, we mark the partition as interleaved when; 1. we find an earlier partition index when looping over the sorted-by-Datum indexes[] array, or; 2. we find that the NULL partition allows some non-NULL Datum value. In the code, as it was written in db632fbca we'll continue to check for case 2 when we've already marked the partition as interleaved for case 1. Here we make it so we don't bother marking the partition as interleaved for case 2 when it's already been marked due to case 1. Really all this saves is a useless call to bms_add_member(), but since this code is new to PG15, it seems worth fixing it now to save anyone the trouble of complaining at some time in the future. We have the opportunity to improve this now before PG15 is out. This might ease some future back-patching pain. Per report and patch by Zhihong Yu. However, I slightly revised the comments and altered the bms_add_member() code to match in both locations. We already know that index is equal to boundinfo->null_index from the if condition. Author: Zhihong Yu Discussion: https://postgr.es/m/CALNJ-vQbZR0pYxz9zQ5bqXVcwtGgNgVupeEpNT65HZ+yWZnc4g@mail.gmail.com Backpatch-through: 15, same as db632fbca.
PostgreSQL Database Management System ===================================== This directory contains the source code distribution of the PostgreSQL database management system. PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings. PostgreSQL has many language interfaces, many of which are listed here: https://www.postgresql.org/download/ See the file INSTALL for instructions on how to build and install PostgreSQL. That file also lists supported operating systems and hardware platforms and contains information regarding any other software packages that are required to build or run the PostgreSQL system. Copyright and license information can be found in the file COPYRIGHT. A comprehensive documentation set is included in this distribution; it can be read as described in the installation instructions. The latest version of this software may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.
Description
Languages
C
85.7%
PLpgSQL
5.8%
Perl
4.1%
Yacc
1.3%
Makefile
0.7%
Other
2.3%