Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coPL7-0003GV-Kb for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Mar 2017 06:56:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1coPL6-0004vP-U6 for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Mar 2017 06:56:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1coPKO-0002O6-P8 for pgsql-bugs@postgresql.org; Thu, 16 Mar 2017 06:56:05 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1coPKL-00039a-6M for pgsql-bugs@postgresql.org; Thu, 16 Mar 2017 06:56:03 +0000 Received: from [192.168.127.1] (port=29470 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1coPKH-000Ghj-2y; Thu, 16 Mar 2017 06:55:57 +0000 Received: from [127.0.0.1] (port=33526 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1coPKG-000Dkx-5x; Thu, 16 Mar 2017 06:55:56 +0000 From: Andrew Gierth To: pgsql-bugs@postgresql.org Cc: Andres Freund Subject: Re: BUG #14057: vacuum setting reltuples=0 for tables with >0 tuples In-Reply-To: <20160331104129.GG23562@awork2.anarazel.de> (Andres Freund's message of "Thu, 31 Mar 2016 12:41:29 +0200") Message-ID: <87y3w53est.fsf@news-spur.riddles.org.uk> References: <20160331103739.8956.94469@wrigleys.postgresql.org> <20160331104129.GG23562@awork2.anarazel.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Thu, 16 Mar 2017 06:55:54 +0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --=-=-= Content-Type: text/plain >>>>> "Andres" == Andres Freund writes: >> It looks like fixing this requires breaking scanned_pages out into >> at least two separate counters, since we currently use it to track >> both whether we can update stats, and whether we can update >> relfrozenxid. Andres> Are you planning to submit a fix? Somewhat belatedly, yes. Attached are patches against master and all the back branches back to 9.2. I've reproduced the bug on all of them, and confirmed that this fixes it on all of them. Is it worth also including the isolation tester script in the changes? I can go ahead and commit these if they look ok. -- Andrew (irc:RhodiumToad) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vacstats_92.patch Content-Description: vacuum vs reltuples: 9.2 diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 8aefa7aaa9..a33541a115 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -100,7 +100,8 @@ typedef struct LVRelStats BlockNumber old_rel_pages; /* previous value of pg_class.relpages */ BlockNumber rel_pages; /* total number of pages */ BlockNumber scanned_pages; /* number of pages we examined */ - double scanned_tuples; /* counts only tuples on scanned pages */ + BlockNumber tupcount_pages; /* pages whose tuples we counted */ + double scanned_tuples; /* counts only tuples on tupcount_pages */ double old_rel_tuples; /* previous value of pg_class.reltuples */ double new_rel_tuples; /* new estimated total # of tuples */ BlockNumber pages_removed; @@ -258,6 +259,10 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, * density") with nonzero relpages and reltuples=0 (which means "zero * tuple density") unless there's some actual evidence for the latter. * + * It's important that we use tupcount_pages and not scanned_pages for the + * check described above; scanned_pages counts pages where we could not get + * cleanup lock, and which were processed only for frozenxid purposes. + * * We do update relallvisible even in the corner case, since if the table * is all-visible we'd definitely like to know that. But clamp the value * to be not more than what we're setting relpages to. @@ -267,7 +272,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, */ new_rel_pages = vacrelstats->rel_pages; new_rel_tuples = vacrelstats->new_rel_tuples; - if (vacrelstats->scanned_pages == 0 && new_rel_pages > 0) + if (vacrelstats->tupcount_pages == 0 && new_rel_pages > 0) { new_rel_pages = vacrelstats->old_rel_pages; new_rel_tuples = vacrelstats->old_rel_tuples; @@ -423,6 +428,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, nblocks = RelationGetNumberOfBlocks(onerel); vacrelstats->rel_pages = nblocks; vacrelstats->scanned_pages = 0; + vacrelstats->tupcount_pages = 0; vacrelstats->nonempty_pages = 0; vacrelstats->latestRemovedXid = InvalidTransactionId; @@ -613,6 +619,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, } vacrelstats->scanned_pages++; + vacrelstats->tupcount_pages++; page = BufferGetPage(buf); @@ -999,7 +1006,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, /* now we can compute the new value for pg_class.reltuples */ vacrelstats->new_rel_tuples = vac_estimate_reltuples(onerel, false, nblocks, - vacrelstats->scanned_pages, + vacrelstats->tupcount_pages, num_tuples); /* @@ -1264,7 +1271,7 @@ lazy_cleanup_index(Relation indrel, ivinfo.index = indrel; ivinfo.analyze_only = false; - ivinfo.estimated_count = (vacrelstats->scanned_pages < vacrelstats->rel_pages); + ivinfo.estimated_count = (vacrelstats->tupcount_pages < vacrelstats->rel_pages); ivinfo.message_level = elevel; ivinfo.num_heap_tuples = vacrelstats->new_rel_tuples; ivinfo.strategy = vac_strategy; --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vacstats_93.patch Content-Description: vacuum vs reltuples: 9.3 diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 86114f7b89..6ece3591e4 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -103,7 +103,8 @@ typedef struct LVRelStats BlockNumber old_rel_pages; /* previous value of pg_class.relpages */ BlockNumber rel_pages; /* total number of pages */ BlockNumber scanned_pages; /* number of pages we examined */ - double scanned_tuples; /* counts only tuples on scanned pages */ + BlockNumber tupcount_pages; /* pages whose tuples we counted */ + double scanned_tuples; /* counts only tuples on tupcount_pages */ double old_rel_tuples; /* previous value of pg_class.reltuples */ double new_rel_tuples; /* new estimated total # of tuples */ BlockNumber pages_removed; @@ -278,6 +279,10 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, * density") with nonzero relpages and reltuples=0 (which means "zero * tuple density") unless there's some actual evidence for the latter. * + * It's important that we use tupcount_pages and not scanned_pages for the + * check described above; scanned_pages counts pages where we could not get + * cleanup lock, and which were processed only for frozenxid purposes. + * * We do update relallvisible even in the corner case, since if the table * is all-visible we'd definitely like to know that. But clamp the value * to be not more than what we're setting relpages to. @@ -287,7 +292,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, */ new_rel_pages = vacrelstats->rel_pages; new_rel_tuples = vacrelstats->new_rel_tuples; - if (vacrelstats->scanned_pages == 0 && new_rel_pages > 0) + if (vacrelstats->tupcount_pages == 0 && new_rel_pages > 0) { new_rel_pages = vacrelstats->old_rel_pages; new_rel_tuples = vacrelstats->old_rel_tuples; @@ -446,6 +451,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, nblocks = RelationGetNumberOfBlocks(onerel); vacrelstats->rel_pages = nblocks; vacrelstats->scanned_pages = 0; + vacrelstats->tupcount_pages = 0; vacrelstats->nonempty_pages = 0; vacrelstats->latestRemovedXid = InvalidTransactionId; @@ -636,6 +642,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, } vacrelstats->scanned_pages++; + vacrelstats->tupcount_pages++; page = BufferGetPage(buf); @@ -1046,7 +1053,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, /* now we can compute the new value for pg_class.reltuples */ vacrelstats->new_rel_tuples = vac_estimate_reltuples(onerel, false, nblocks, - vacrelstats->scanned_pages, + vacrelstats->tupcount_pages, num_tuples); /* @@ -1350,7 +1357,7 @@ lazy_cleanup_index(Relation indrel, ivinfo.index = indrel; ivinfo.analyze_only = false; - ivinfo.estimated_count = (vacrelstats->scanned_pages < vacrelstats->rel_pages); + ivinfo.estimated_count = (vacrelstats->tupcount_pages < vacrelstats->rel_pages); ivinfo.message_level = elevel; ivinfo.num_heap_tuples = vacrelstats->new_rel_tuples; ivinfo.strategy = vac_strategy; --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vacstats_94.patch Content-Description: vacuum vs reltuples: 9.4 diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 50085f9a54..95f5952f63 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -104,7 +104,8 @@ typedef struct LVRelStats BlockNumber old_rel_pages; /* previous value of pg_class.relpages */ BlockNumber rel_pages; /* total number of pages */ BlockNumber scanned_pages; /* number of pages we examined */ - double scanned_tuples; /* counts only tuples on scanned pages */ + BlockNumber tupcount_pages; /* pages whose tuples we counted */ + double scanned_tuples; /* counts only tuples on tupcount_pages */ double old_rel_tuples; /* previous value of pg_class.reltuples */ double new_rel_tuples; /* new estimated total # of tuples */ double new_dead_tuples; /* new estimated total # of dead tuples */ @@ -281,6 +282,10 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, * density") with nonzero relpages and reltuples=0 (which means "zero * tuple density") unless there's some actual evidence for the latter. * + * It's important that we use tupcount_pages and not scanned_pages for the + * check described above; scanned_pages counts pages where we could not get + * cleanup lock, and which were processed only for frozenxid purposes. + * * We do update relallvisible even in the corner case, since if the table * is all-visible we'd definitely like to know that. But clamp the value * to be not more than what we're setting relpages to. @@ -290,7 +295,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt, */ new_rel_pages = vacrelstats->rel_pages; new_rel_tuples = vacrelstats->new_rel_tuples; - if (vacrelstats->scanned_pages == 0 && new_rel_pages > 0) + if (vacrelstats->tupcount_pages == 0 && new_rel_pages > 0) { new_rel_pages = vacrelstats->old_rel_pages; new_rel_tuples = vacrelstats->old_rel_tuples; @@ -455,6 +460,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, nblocks = RelationGetNumberOfBlocks(onerel); vacrelstats->rel_pages = nblocks; vacrelstats->scanned_pages = 0; + vacrelstats->tupcount_pages = 0; vacrelstats->nonempty_pages = 0; vacrelstats->latestRemovedXid = InvalidTransactionId; @@ -645,6 +651,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, } vacrelstats->scanned_pages++; + vacrelstats->tupcount_pages++; page = BufferGetPage(buf); @@ -1053,7 +1060,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, /* now we can compute the new value for pg_class.reltuples */ vacrelstats->new_rel_tuples = vac_estimate_reltuples(onerel, false, nblocks, - vacrelstats->scanned_pages, + vacrelstats->tupcount_pages, num_tuples); /* @@ -1357,7 +1364,7 @@ lazy_cleanup_index(Relation indrel, ivinfo.index = indrel; ivinfo.analyze_only = false; - ivinfo.estimated_count = (vacrelstats->scanned_pages < vacrelstats->rel_pages); + ivinfo.estimated_count = (vacrelstats->tupcount_pages < vacrelstats->rel_pages); ivinfo.message_level = elevel; ivinfo.num_heap_tuples = vacrelstats->new_rel_tuples; ivinfo.strategy = vac_strategy; --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vacstats_95.patch Content-Description: vacuum vs reltuples: 9.5 diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 64626edf70..2654c9ebef 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -106,7 +106,8 @@ typedef struct LVRelStats BlockNumber rel_pages; /* total number of pages */ BlockNumber scanned_pages; /* number of pages we examined */ BlockNumber pinskipped_pages; /* # of pages we skipped due to a pin */ - double scanned_tuples; /* counts only tuples on scanned pages */ + BlockNumber tupcount_pages; /* pages whose tuples we counted */ + double scanned_tuples; /* counts only tuples on tupcount_pages */ double old_rel_tuples; /* previous value of pg_class.reltuples */ double new_rel_tuples; /* new estimated total # of tuples */ double new_dead_tuples; /* new estimated total # of dead tuples */ @@ -286,6 +287,10 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params, * density") with nonzero relpages and reltuples=0 (which means "zero * tuple density") unless there's some actual evidence for the latter. * + * It's important that we use tupcount_pages and not scanned_pages for the + * check described above; scanned_pages counts pages where we could not get + * cleanup lock, and which were processed only for frozenxid purposes. + * * We do update relallvisible even in the corner case, since if the table * is all-visible we'd definitely like to know that. But clamp the value * to be not more than what we're setting relpages to. @@ -295,7 +300,7 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params, */ new_rel_pages = vacrelstats->rel_pages; new_rel_tuples = vacrelstats->new_rel_tuples; - if (vacrelstats->scanned_pages == 0 && new_rel_pages > 0) + if (vacrelstats->tupcount_pages == 0 && new_rel_pages > 0) { new_rel_pages = vacrelstats->old_rel_pages; new_rel_tuples = vacrelstats->old_rel_tuples; @@ -474,6 +479,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, nblocks = RelationGetNumberOfBlocks(onerel); vacrelstats->rel_pages = nblocks; vacrelstats->scanned_pages = 0; + vacrelstats->tupcount_pages = 0; vacrelstats->nonempty_pages = 0; vacrelstats->latestRemovedXid = InvalidTransactionId; @@ -666,6 +672,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, } vacrelstats->scanned_pages++; + vacrelstats->tupcount_pages++; page = BufferGetPage(buf); @@ -1074,7 +1081,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, /* now we can compute the new value for pg_class.reltuples */ vacrelstats->new_rel_tuples = vac_estimate_reltuples(onerel, false, nblocks, - vacrelstats->scanned_pages, + vacrelstats->tupcount_pages, num_tuples); /* @@ -1393,7 +1400,7 @@ lazy_cleanup_index(Relation indrel, ivinfo.index = indrel; ivinfo.analyze_only = false; - ivinfo.estimated_count = (vacrelstats->scanned_pages < vacrelstats->rel_pages); + ivinfo.estimated_count = (vacrelstats->tupcount_pages < vacrelstats->rel_pages); ivinfo.message_level = elevel; ivinfo.num_heap_tuples = vacrelstats->new_rel_tuples; ivinfo.strategy = vac_strategy; --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vacstats_96.patch Content-Description: vacuum vs reltuples: 9.6 diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index b5fb325007..56311fef75 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -108,7 +108,8 @@ typedef struct LVRelStats BlockNumber scanned_pages; /* number of pages we examined */ BlockNumber pinskipped_pages; /* # of pages we skipped due to a pin */ BlockNumber frozenskipped_pages; /* # of frozen pages we skipped */ - double scanned_tuples; /* counts only tuples on scanned pages */ + BlockNumber tupcount_pages; /* pages whose tuples we counted */ + double scanned_tuples; /* counts only tuples on tupcount_pages */ double old_rel_tuples; /* previous value of pg_class.reltuples */ double new_rel_tuples; /* new estimated total # of tuples */ double new_dead_tuples; /* new estimated total # of dead tuples */ @@ -293,6 +294,10 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params, * density") with nonzero relpages and reltuples=0 (which means "zero * tuple density") unless there's some actual evidence for the latter. * + * It's important that we use tupcount_pages and not scanned_pages for the + * check described above; scanned_pages counts pages where we could not get + * cleanup lock, and which were processed only for frozenxid purposes. + * * We do update relallvisible even in the corner case, since if the table * is all-visible we'd definitely like to know that. But clamp the value * to be not more than what we're setting relpages to. @@ -302,7 +307,7 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params, */ new_rel_pages = vacrelstats->rel_pages; new_rel_tuples = vacrelstats->new_rel_tuples; - if (vacrelstats->scanned_pages == 0 && new_rel_pages > 0) + if (vacrelstats->tupcount_pages == 0 && new_rel_pages > 0) { new_rel_pages = vacrelstats->old_rel_pages; new_rel_tuples = vacrelstats->old_rel_tuples; @@ -489,6 +494,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, nblocks = RelationGetNumberOfBlocks(onerel); vacrelstats->rel_pages = nblocks; vacrelstats->scanned_pages = 0; + vacrelstats->tupcount_pages = 0; vacrelstats->nonempty_pages = 0; vacrelstats->latestRemovedXid = InvalidTransactionId; @@ -811,6 +817,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, } vacrelstats->scanned_pages++; + vacrelstats->tupcount_pages++; page = BufferGetPage(buf); @@ -1254,7 +1261,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, /* now we can compute the new value for pg_class.reltuples */ vacrelstats->new_rel_tuples = vac_estimate_reltuples(onerel, false, nblocks, - vacrelstats->scanned_pages, + vacrelstats->tupcount_pages, num_tuples); /* @@ -1618,7 +1625,7 @@ lazy_cleanup_index(Relation indrel, ivinfo.index = indrel; ivinfo.analyze_only = false; - ivinfo.estimated_count = (vacrelstats->scanned_pages < vacrelstats->rel_pages); + ivinfo.estimated_count = (vacrelstats->tupcount_pages < vacrelstats->rel_pages); ivinfo.message_level = elevel; ivinfo.num_heap_tuples = vacrelstats->new_rel_tuples; ivinfo.strategy = vac_strategy; --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=vacstats_head.patch Content-Description: vacuum vs reltuples: head diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 5d47f16ee4..b74e4934ec 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -114,7 +114,8 @@ typedef struct LVRelStats BlockNumber scanned_pages; /* number of pages we examined */ BlockNumber pinskipped_pages; /* # of pages we skipped due to a pin */ BlockNumber frozenskipped_pages; /* # of frozen pages we skipped */ - double scanned_tuples; /* counts only tuples on scanned pages */ + BlockNumber tupcount_pages; /* pages whose tuples we counted */ + double scanned_tuples; /* counts only tuples on tupcount_pages */ double old_rel_tuples; /* previous value of pg_class.reltuples */ double new_rel_tuples; /* new estimated total # of tuples */ double new_dead_tuples; /* new estimated total # of dead tuples */ @@ -299,6 +300,10 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params, * density") with nonzero relpages and reltuples=0 (which means "zero * tuple density") unless there's some actual evidence for the latter. * + * It's important that we use tupcount_pages and not scanned_pages for the + * check described above; scanned_pages counts pages where we could not + * get cleanup lock, and which were processed only for frozenxid purposes. + * * We do update relallvisible even in the corner case, since if the table * is all-visible we'd definitely like to know that. But clamp the value * to be not more than what we're setting relpages to. @@ -308,7 +313,7 @@ lazy_vacuum_rel(Relation onerel, int options, VacuumParams *params, */ new_rel_pages = vacrelstats->rel_pages; new_rel_tuples = vacrelstats->new_rel_tuples; - if (vacrelstats->scanned_pages == 0 && new_rel_pages > 0) + if (vacrelstats->tupcount_pages == 0 && new_rel_pages > 0) { new_rel_pages = vacrelstats->old_rel_pages; new_rel_tuples = vacrelstats->old_rel_tuples; @@ -496,6 +501,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, nblocks = RelationGetNumberOfBlocks(onerel); vacrelstats->rel_pages = nblocks; vacrelstats->scanned_pages = 0; + vacrelstats->tupcount_pages = 0; vacrelstats->nonempty_pages = 0; vacrelstats->latestRemovedXid = InvalidTransactionId; @@ -818,6 +824,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, } vacrelstats->scanned_pages++; + vacrelstats->tupcount_pages++; page = BufferGetPage(buf); @@ -1261,7 +1268,7 @@ lazy_scan_heap(Relation onerel, int options, LVRelStats *vacrelstats, /* now we can compute the new value for pg_class.reltuples */ vacrelstats->new_rel_tuples = vac_estimate_reltuples(onerel, false, nblocks, - vacrelstats->scanned_pages, + vacrelstats->tupcount_pages, num_tuples); /* @@ -1625,7 +1632,7 @@ lazy_cleanup_index(Relation indrel, ivinfo.index = indrel; ivinfo.analyze_only = false; - ivinfo.estimated_count = (vacrelstats->scanned_pages < vacrelstats->rel_pages); + ivinfo.estimated_count = (vacrelstats->tupcount_pages < vacrelstats->rel_pages); ivinfo.message_level = elevel; ivinfo.num_heap_tuples = vacrelstats->new_rel_tuples; ivinfo.strategy = vac_strategy; --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs --=-=-=--