pgsql: Avoid loss of code coverage with unlogged-index test cases. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Avoid loss of code coverage with unlogged-index test cases.
Date
Msg-id E1ocV97-001yU0-Iw@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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
------
master

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

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(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Add missing source files to pg_waldump/nls.mk
Next
From: Tom Lane
Date:
Subject: pgsql: Fix tupdesc lifespan bug with AfterTriggersTableData.storeslot.