Re: tweak to a few index tests to hits ambuildempty() routine.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: a.kozhemyakin@postgrespro.ru
Cc: Noah Misch <noah@leadboat.com>, Amul Sul <sulamul@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, thomas.munro@gmail.com, alvherre@alvh.no-ip.org
Date: 2022-09-25T15:51:59Z
Lists: pgsql-hackers
I wrote:
> Yeah.  You can see that the coverage-test animal is not reaching it
> anymore:
> https://coverage.postgresql.org/src/backend/access/gin/ginvacuum.c.gcov.html

That's what it's saying *now*, but after rereading this whole thread
I see that it apparently said something different last week.  So the
coverage is probabilistic, which squares with this discussion and
with some tests I just did locally.  That's not good.  I shudder to
imagine how much time somebody might waste trying to locate a bug
in this area, if a test failure appears and disappears regardless
of code changes they make while chasing it.

I propose that we revert 4fb5c794e and instead add separate test
cases that just create unlogged indexes (I guess they don't actually
need to *do* anything with them?).  Looks like dec8ad367 could be
reverted as well, in view of 2f2e24d90.

			regards, tom lane



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Avoid loss of code coverage with unlogged-index test cases.

  2. Use --no-unlogged-table-data in t/027_stream_regress.pl.

  3. Cover brin/gin/gist/spgist ambuildempty routines in regression tests

  4. Improve test coverage of ginvacuum.c.