Open ioguix opened 7 years ago
Maybe this commit will change query's result : https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=7c91a0364fcf5d739a09cc87e7adb1d4a33ed112
So based on the commits, we can assume that the current versions of PG v10+ are OK now, right?
Hi,
As I understand the discussion on pgsql-hackers, this patch hasn't been back-patched to v10. So it's OK for v11 and after.
Thanks!
hi ioguix,
after I REINDEX an index, the output bloat_size
about the index doesn't change. I think the reltuples
doesn't update after REINDEX. My question is what columns could I use instead of reltuples
? which table the live_tuples
is in you said?
Hi @shangzixie,
It comes from pg_stat_all_tables.n_live_tup
.
after I REINDEX an index, the output bloat_size about the index doesn't change.
On what version are you testing? Could you share your scenario?
Hi @shangzixie,
It comes from
pg_stat_all_tables.n_live_tup
.after I REINDEX an index, the output bloat_size about the index doesn't change.
On what version are you testing? Could you share your scenario?
just, run your sql and reindex some table.
Oh, I found need to ANALYZE
, so as to update reltuples.
See discussion: https://www.postgresql.org/message-id/flat/16db4468-edfa-830a-f921-39a50498e77e%402ndquadrant.com#16db4468-edfa-830a-f921-39a50498e77e@2ndquadrant.com