Test coverage for mark_invalid_subplans_as_finished

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Test coverage for mark_invalid_subplans_as_finished
Date: 2018-04-17 09:46:35
Message-ID: CAKJS1f--hopb6JBSDY4wiXTS3ZcDp-wparXjTQ1nzNdBa04Fog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro pinged me off list to mention the coverage tool indicates that
there's no test coverage for mark_invalid_subplans_as_finished() [1].

The attached patch aims to put that right. This function would only
ever be called during a Parallel Append in a query which has some exec
Params being compared to the partition key. Having only external
params would cause the unneeded subnodes to be completely eliminated
during initialization of the Append node. So it seems I just failed to
update the tests when I made the code eliminate the unneeded subplans
during initialization of the executor.

In passing I also noticed that the ab_q6 tests were not actually
required to have a generic plan. The tests were testing exec Params
not external Params, so there was no need for the PREPARE. I've
removed the PREPARE and just made these plain queries. I've ended up
calling the new queries from explain_parallel_append. That may be
unnecessary since they don't actually have a Parallel Append node,
just an Append.

[1] https://coverage.postgresql.org/src/backend/executor/nodeAppend.c.gcov.html

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
mark_invalid_subplans_as_finished_coverage.patch application/octet-stream 13.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2018-04-17 10:00:01 Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.
Previous Message Ashutosh Bapat 2018-04-17 09:43:51 Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.