Re: tweak to a few index tests to hits ambuildempty() routine. - Mailing list pgsql-hackers

From a.kozhemyakin@postgrespro.ru
Subject Re: tweak to a few index tests to hits ambuildempty() routine.
Date
Msg-id b00c8ee096ee46cd25c183125562a1a7@postgrespro.ru
Whole thread Raw
In response to tweak to a few index tests to hits ambuildempty() routine.  (Amul Sul <sulamul@gmail.com>)
Responses Re: tweak to a few index tests to hits ambuildempty() routine.
List pgsql-hackers
Hi,

The commit 4fb5c794e5 eliminates the ginbulkdelete() test coverage 
provided by the commit 4c51a2d1e4 two years ago.
With the following Assert added:
@@ -571,7 +571,7 @@ ginbulkdelete(IndexVacuumInfo *info, 
IndexBulkDeleteResult *stats,
         Buffer          buffer;
         BlockNumber rootOfPostingTree[BLCKSZ / (sizeof(IndexTupleData) + 
sizeof(ItemId))];
         uint32          nRoot;
-
+       Assert(0);
         gvs.tmpCxt = AllocSetContextCreate(CurrentMemoryContext,
                                                                          
   "Gin vacuum temporary context",
                                                                          
   ALLOCSET_DEFAULT_SIZES);
I have check-world passed successfully.

Amul Sul писал 2021-11-29 12:04:
> Hi,
> 
> Attached patch is doing small changes to brin, gin & gist index tests
> to use an unlogged table without changing the original intention of
> those tests and that is able to hit ambuildempty() routing which is
> otherwise not reachable by the current tests.



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: pg_stat_statements locking
Next
From: Alvaro Herrera
Date:
Subject: Re: pg15b4: FailedAssertion("TransactionIdIsValid(xmax)