pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Re-adjust drop-index-concurrently-1 isolation test
4+ messages / 1 participants
[nested] [flat]

* pgsql: Re-adjust drop-index-concurrently-1 isolation test
@ 2022-12-15 22:40  David Rowley <drowley@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: David Rowley @ 2022-12-15 22:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Re-adjust drop-index-concurrently-1 isolation test

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8b6b043ceef29a0a7a462b748da398511832efcf

Modified Files
--------------
.../expected/drop-index-concurrently-1.out         | 31 +++++++++++-----------
.../expected/drop-index-concurrently-1_2.out       | 31 +++++++++++-----------
.../isolation/specs/drop-index-concurrently-1.spec | 22 ++++++++-------
3 files changed, 44 insertions(+), 40 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Re-adjust drop-index-concurrently-1 isolation test
@ 2022-12-15 22:40  David Rowley <drowley@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: David Rowley @ 2022-12-15 22:40 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Re-adjust drop-index-concurrently-1 isolation test

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1a9b43c688da9bbb13f0cb07d4b4c03abf1518b5

Modified Files
--------------
.../expected/drop-index-concurrently-1.out         | 31 +++++++++++-----------
.../expected/drop-index-concurrently-1_2.out       | 31 +++++++++++-----------
.../isolation/specs/drop-index-concurrently-1.spec | 22 ++++++++-------
3 files changed, 44 insertions(+), 40 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Re-adjust drop-index-concurrently-1 isolation test
@ 2022-12-15 22:41  David Rowley <drowley@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: David Rowley @ 2022-12-15 22:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Re-adjust drop-index-concurrently-1 isolation test

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

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/171d7746a21dfb0e19c008b7a398e1ee1ad7f74e

Modified Files
--------------
.../expected/drop-index-concurrently-1.out         | 31 +++++++++++-----------
.../expected/drop-index-concurrently-1_2.out       | 31 +++++++++++-----------
.../isolation/specs/drop-index-concurrently-1.spec | 22 ++++++++-------
3 files changed, 44 insertions(+), 40 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Re-adjust drop-index-concurrently-1 isolation test
@ 2022-12-15 22:41  David Rowley <drowley@postgresql.org>
  0 siblings, 0 replies; 4+ messages in thread

From: David Rowley @ 2022-12-15 22:41 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Re-adjust drop-index-concurrently-1 isolation test

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e39856d1f027a91f20e7c8cac7a5c844b74c4962

Modified Files
--------------
.../expected/drop-index-concurrently-1.out         | 31 +++++++++++-----------
.../expected/drop-index-concurrently-1_2.out       | 31 +++++++++++-----------
.../isolation/specs/drop-index-concurrently-1.spec | 22 ++++++++-------
3 files changed, 44 insertions(+), 40 deletions(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2022-12-15 22:41 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-12-15 22:40 pgsql: Re-adjust drop-index-concurrently-1 isolation test David Rowley <drowley@postgresql.org>
2022-12-15 22:40 pgsql: Re-adjust drop-index-concurrently-1 isolation test David Rowley <drowley@postgresql.org>
2022-12-15 22:41 pgsql: Re-adjust drop-index-concurrently-1 isolation test David Rowley <drowley@postgresql.org>
2022-12-15 22:41 pgsql: Re-adjust drop-index-concurrently-1 isolation test David Rowley <drowley@postgresql.org>

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