pgsql: Update relation's stats in pg_class during vacuum full.

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Update relation's stats in pg_class during vacuum full.
Date: 2017-12-27 15:27:16
Message-ID: E1eUDbw-0005Ev-Qc@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Update relation's stats in pg_class during vacuum full.

Hash index depends on estimation of numbers of tuples and pages of relations,
incorrect value could be a reason of significantly growing of index. Vacuum
full recreates heap and reindex all indexes before renewal stats. The patch
fixes that, so indexes will see correct values.

Backpatch to v10 only because earlier versions haven't usable hash index and
growing of hash index is a single user-visible symptom.

Author: Amit Kapila
Reviewed-by: Ashutosh Sharma, me
Discussion: https://www.postgresql.org/message-id/flat/20171115232922(dot)5tomkxnw3iq6jsg7(at)inml(dot)weebeastie(dot)net

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/bdbf29aaef7d1c698c1c5838a7b8cb027c406f9c

Modified Files
--------------
src/backend/commands/cluster.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-12-27 18:47:04 pgsql: Add pow(), aka power(), function to pgbench.
Previous Message Teodor Sigaev 2017-12-27 15:26:18 pgsql: Update relation's stats in pg_class during vacuum full.