From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid loss of code coverage with unlogged-index test cases.
Date: Sun, 25 Sep 2022 17:10:26 +0000
Message-ID: <E1ocV97-001yU2-JV@gemulon.postgresql.org> (raw)
Avoid loss of code coverage with unlogged-index test cases.
Commit 4fb5c794e intended to add coverage of some ambuildempty
methods that were not getting reached, without removing any
test coverage. However, by changing a temp table to unlogged
it managed to negate the intent of 4c51a2d1e, which means that
we didn't have reliable test coverage of ginvacuum.c anymore.
As things stand, much of that file might or might not get reached
depending on timing, which seems pretty undesirable.
Although this is only clearly broken for the GIN test, it seems
best to revert 4fb5c794e altogether and instead add bespoke test
cases covering unlogged indexes for these four AMs. We don't
need to do very much with them, so the extra tests are cheap.
(Note that btree, hash, and bloom already have similar test cases,
so they need no additional work.)
We can also undo dec8ad367. Since the testing deficiency that that
hacked around was later fixed by 2f2e24d90, let's intentionally leave
an unlogged table behind to improve test coverage in the modules that
use the regression database for other test purposes. (The case I used
also leaves an unlogged sequence behind.)
Per report from Alex Kozhemyakin. Back-patch to v15 where the
faulty test came in.
Discussion: https://postgr.es/m/b00c8ee096ee46cd25c183125562a1a7@postgrespro.ru
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/7a84c35fe6dcec62c95d023ad057e5717d9304a1
Modified Files
--------------
src/test/regress/expected/brin.out | 7 ++++++-
src/test/regress/expected/gin.out | 11 ++++++++++-
src/test/regress/expected/gist.out | 8 +++++++-
src/test/regress/expected/spgist.out | 11 +++++++++--
src/test/regress/sql/brin.sql | 8 +++++++-
src/test/regress/sql/gin.sql | 12 +++++++++++-
src/test/regress/sql/gist.sql | 9 ++++++++-
src/test/regress/sql/spgist.sql | 12 ++++++++++--
8 files changed, 68 insertions(+), 10 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Avoid loss of code coverage with unlogged-index test cases.
In-Reply-To: <E1ocV97-001yU2-JV@gemulon.postgresql.org>
References: <E1ocV97-001yU2-JV@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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