Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oatsd-0006kB-Bi for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Sep 2022 07:10:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oatsc-00006o-7K for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Sep 2022 07:10:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oatsb-0008W8-KA for pgsql-hackers@lists.postgresql.org; Wed, 21 Sep 2022 07:10:45 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oatsY-0001bC-Tu for pgsql-hackers@lists.postgresql.org; Wed, 21 Sep 2022 07:10:45 +0000 Received: from mail.postgrespro.ru (cyclops.postgrespro.ru [93.174.131.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 4B30021C3D40; Wed, 21 Sep 2022 10:10:42 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1663744242; bh=LRQwuYmNFwxgIZCw2igLrzzHexascwDKu6wZJ7Q5o6k=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=AK6sMj2YEqKLOWdqaW0wkz+DHIEEe9k5EAXZW34jou5r6BtxlqaqbMrEFhxqyAXRc MyzmSsOFtA04xqrb8ygUkdVNZfqwxIVRBQBWF7Wnkn6sOZZYFBA1zGQFN+I7/S4Rgp AI13bhtbUFApEr/tD9yQgqkakf8BZUOK6M5GoCiU= MIME-Version: 1.0 Date: Wed, 21 Sep 2022 14:10:42 +0700 From: a.kozhemyakin@postgrespro.ru To: Amul Sul Cc: PostgreSQL Hackers , thomas.munro@gmail.com, tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, sulamul@gmail.com, noah@leadboat.com Subject: Re: tweak to a few index tests to hits ambuildempty() routine. In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.11 Message-ID: <6c9ec3889fb13b7ffcd9e1dc3e1f1e08@postgrespro.ru> X-Sender: a.kozhemyakin@postgrespro.ru Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk After analyzing this, I found out why we don't reach that Assert but we have coverage shown - firstly, it reached via another test, vacuum; secondly, it depends on the gcc optimization flag. We reach that Assert only when using -O0. If we build with -O2 or -Og that function is not reached (due to different results of the heap_prune_satisfies_vacuum() check inside heap_page_prune()). But as the make checks mostly (including the buildfarm testing) performed with -O2/-Og, it looks like that after 4fb5c794e5 we have lost the coverage provided by the 4c51a2d1e4. Amul Sul писал 2022-09-14 14:28: > On Wed, Sep 14, 2022 at 12:16 PM wrote: >> >> I still wonder, if assert doesn't catch why that place is marked as >> covered here? >> https://coverage.postgresql.org/src/backend/access/gin/ginvacuum.c.gcov.html >> > > Probably other tests cover that. > > Regards, > Amul