pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Make gistvacuumcleanup() count the actual number of index tuples 6+ messages / 1 participants [nested] [flat]
* pgsql: Make gistvacuumcleanup() count the actual number of index tuples @ 2018-03-02 16:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-02 16:22 UTC (permalink / raw) To: pgsql-committers Make gistvacuumcleanup() count the actual number of index tuples. Previously, it just returned the heap tuple count, which might be only an estimate, and would be completely the wrong thing if the index is partial. Since this function scans every index page anyway to find free pages, it's practically free to count the surviving index tuples. Let's do that and return an accurate count. This is easily visible as a wrong reltuples value for a partial GiST index following VACUUM, so back-patch to all supported branches. Andrey Borodin, reviewed by Michail Nikolaev Discussion: https://postgr.es/m/151956654251.6915.675951950408204404.pgcf@coridan.postgresql.org Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/81b9b5ce490a645bde8df203ec4a3b2903d88f31 Modified Files -------------- src/backend/access/gist/gistvacuum.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make gistvacuumcleanup() count the actual number of index tuples @ 2018-03-02 16:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-02 16:22 UTC (permalink / raw) To: pgsql-committers Make gistvacuumcleanup() count the actual number of index tuples. Previously, it just returned the heap tuple count, which might be only an estimate, and would be completely the wrong thing if the index is partial. Since this function scans every index page anyway to find free pages, it's practically free to count the surviving index tuples. Let's do that and return an accurate count. This is easily visible as a wrong reltuples value for a partial GiST index following VACUUM, so back-patch to all supported branches. Andrey Borodin, reviewed by Michail Nikolaev Discussion: https://postgr.es/m/151956654251.6915.675951950408204404.pgcf@coridan.postgresql.org Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ccd650430db6168aaaae0b28702e11caf7781bf4 Modified Files -------------- src/backend/access/gist/gistvacuum.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make gistvacuumcleanup() count the actual number of index tuples @ 2018-03-02 16:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-02 16:22 UTC (permalink / raw) To: pgsql-committers Make gistvacuumcleanup() count the actual number of index tuples. Previously, it just returned the heap tuple count, which might be only an estimate, and would be completely the wrong thing if the index is partial. Since this function scans every index page anyway to find free pages, it's practically free to count the surviving index tuples. Let's do that and return an accurate count. This is easily visible as a wrong reltuples value for a partial GiST index following VACUUM, so back-patch to all supported branches. Andrey Borodin, reviewed by Michail Nikolaev Discussion: https://postgr.es/m/151956654251.6915.675951950408204404.pgcf@coridan.postgresql.org Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/529137cac9a8f0db6cca23a5c305b533cd2dd880 Modified Files -------------- src/backend/access/gist/gistvacuum.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make gistvacuumcleanup() count the actual number of index tuples @ 2018-03-02 16:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-02 16:22 UTC (permalink / raw) To: pgsql-committers Make gistvacuumcleanup() count the actual number of index tuples. Previously, it just returned the heap tuple count, which might be only an estimate, and would be completely the wrong thing if the index is partial. Since this function scans every index page anyway to find free pages, it's practically free to count the surviving index tuples. Let's do that and return an accurate count. This is easily visible as a wrong reltuples value for a partial GiST index following VACUUM, so back-patch to all supported branches. Andrey Borodin, reviewed by Michail Nikolaev Discussion: https://postgr.es/m/151956654251.6915.675951950408204404.pgcf@coridan.postgresql.org Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/46d98da43e56aa407242fc5ca6c0303f160cd936 Modified Files -------------- src/backend/access/gist/gistvacuum.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make gistvacuumcleanup() count the actual number of index tuples @ 2018-03-02 16:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-02 16:22 UTC (permalink / raw) To: pgsql-committers Make gistvacuumcleanup() count the actual number of index tuples. Previously, it just returned the heap tuple count, which might be only an estimate, and would be completely the wrong thing if the index is partial. Since this function scans every index page anyway to find free pages, it's practically free to count the surviving index tuples. Let's do that and return an accurate count. This is easily visible as a wrong reltuples value for a partial GiST index following VACUUM, so back-patch to all supported branches. Andrey Borodin, reviewed by Michail Nikolaev Discussion: https://postgr.es/m/151956654251.6915.675951950408204404.pgcf@coridan.postgresql.org Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/947f06c6224e5873e912fa546bbca48ccc4fc229 Modified Files -------------- src/backend/access/gist/gistvacuum.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Make gistvacuumcleanup() count the actual number of index tuples @ 2018-03-02 16:22 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2018-03-02 16:22 UTC (permalink / raw) To: pgsql-committers Make gistvacuumcleanup() count the actual number of index tuples. Previously, it just returned the heap tuple count, which might be only an estimate, and would be completely the wrong thing if the index is partial. Since this function scans every index page anyway to find free pages, it's practically free to count the surviving index tuples. Let's do that and return an accurate count. This is easily visible as a wrong reltuples value for a partial GiST index following VACUUM, so back-patch to all supported branches. Andrey Borodin, reviewed by Michail Nikolaev Discussion: https://postgr.es/m/151956654251.6915.675951950408204404.pgcf@coridan.postgresql.org Branch ------ REL9_3_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6b56f07525a04a22260d3f9650b02c26d2d6c366 Modified Files -------------- src/backend/access/gist/gistvacuum.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-03-02 16:22 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-03-02 16:22 pgsql: Make gistvacuumcleanup() count the actual number of index tuples Tom Lane <tgl@sss.pgh.pa.us> 2018-03-02 16:22 pgsql: Make gistvacuumcleanup() count the actual number of index tuples Tom Lane <tgl@sss.pgh.pa.us> 2018-03-02 16:22 pgsql: Make gistvacuumcleanup() count the actual number of index tuples Tom Lane <tgl@sss.pgh.pa.us> 2018-03-02 16:22 pgsql: Make gistvacuumcleanup() count the actual number of index tuples Tom Lane <tgl@sss.pgh.pa.us> 2018-03-02 16:22 pgsql: Make gistvacuumcleanup() count the actual number of index tuples Tom Lane <tgl@sss.pgh.pa.us> 2018-03-02 16:22 pgsql: Make gistvacuumcleanup() count the actual number of index tuples Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox