
It seems that drop-index-concurrently-1 has started to forget what it was originally meant to be testing. d2d8a229b, which added incremental sorts changed the expected plan to be an Index Scan plan instead of a Seq Scan plan. This occurred as the primary key index of the table in question provided presorted input and, because that index happened to be the cheapest input path due to enable_seqscan being disabled, the incremental sort changes just added a Sort on top of that. It seems based on the name of the PREPAREd statement that the intention here is that the query produces a seqscan plan. The reason this test has become broken seems to be due to how the test was originally coded. The test was trying to force a seqscan plan by performing some casting to make it so the test_dc index couldn't be used to perform the required filtering. Trying to coax the planner into using a plan which has costed in a disable_cost seems like it's always going to be flakey as small changes in costs are drowned out by the large disable_cost combined with add_path's STD_FUZZ_FACTOR. Here we get rid of the casts that we're using to try to trick the planner into a seqscan and instead toggle enable_seqscan as and when required to get the desired plan. Additionally, rename a few things in the test and add some additional wording to the comments to try and make it more clear in the future what we expect this test to be doing. Discussion: https://postgr.es/m/CAApHDvrbDhObhLV+=U_K_-t+2Av2av1aL9d+2j_3AO-XndaviA@mail.gmail.com Backpatch-through: 13, where d2d8a229b changed the expected test output
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%