Increase random_page_cost to fix a plan in updatable_views
authorTomas Vondra <tomas@2ndquadrant.com>
Wed, 18 Oct 2017 20:23:11 +0000 (22:23 +0200)
committerTomas Vondra <tomas@2ndquadrant.com>
Thu, 19 Oct 2017 16:00:12 +0000 (18:00 +0200)
commit2465b91348aefbe44d05bdcc647c97ce6526edb3
tree0f536f757f9d3fba42b9780a43bfa59bdf018789
parentb89e46911d4ee4f61f856d5fddea290e8e511714
Increase random_page_cost to fix a plan in updatable_views

The remote part of a query happens with per-node statistics, i.e. with
only a fraction of the total number of rows. This affects the costing
and may result in somewhat unexpected plan changes.

For example one of the plans in updatable_views changed from hashjoin
to nestloop due to this - the index got a bit smaller, lowering the
cost of inner index scan enough to make nestloop cheaper.

Instead of increasing the number of rows in the test to make it more
expensive again (which would affect the rest of the test), tweak the
random_page_cost for that one query a bit.
src/test/regress/expected/privileges.out
src/test/regress/sql/privileges.sql