mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
Per buildfarm animal mylodon, the plan for this test was sometimes swapping the join order for tenk1 and tenk2. Given that add_path() has no code that would cause this fluctuation when given paths with consistent costs, this indicates that the costs must be fluctuating in some runs. The only proven reason I've seen where that could happen was slight variations in pg_class.relpages for some tables. This was demonstrated to be true by f03a9ca43 and related discussion. Manually adjusting tenk2's pg_class.relpages by subtracting just 1 page does cause the plan to change for this test. Here we've not gone to the same lengths to prove that's what's going on in this case. Proving that does not seem worth the time. Let's just shrink one side of the join so the additional cost of the swapped join order is sufficiently different that if the relpages estimate is off a few pages that the planner still shouldn't swap the join order. Reported-by: Thomas Munro Author: Andy Fan, David Rowley Discussion: https://postgr.es/m/CA+hUKGLqC-NobKYfjxNM3Gexv9OJ-Fhvy9bugUcXsZjTqH7W=Q@mail.gmail.com
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. Copyright and license information can be found in the file COPYRIGHT. General documentation about this version of PostgreSQL can be found at: https://www.postgresql.org/docs/devel/ In particular, information about building PostgreSQL from the source code can be found at: https://www.postgresql.org/docs/devel/installation.html The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.
Languages
C
85.3%
PLpgSQL
5.9%
Perl
4.4%
Yacc
1.2%
Meson
0.7%
Other
2.2%