Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use live_tuples instead of reltuples #4

Open
ioguix opened this issue Jul 28, 2017 · 7 comments
Open

Use live_tuples instead of reltuples #4

ioguix opened this issue Jul 28, 2017 · 7 comments
Labels

Comments

@ioguix
Copy link
Owner

ioguix commented Jul 28, 2017

See discussion: https://www.postgresql.org/message-id/flat/16db4468-edfa-830a-f921-39a50498e77e%402ndquadrant.com#[email protected]

@ioguix ioguix added the bug label Jul 28, 2017
@anayrat
Copy link

anayrat commented Mar 25, 2018

@MichaelDBA
Copy link

So based on the commits, we can assume that the current versions of PG v10+ are OK now, right?

@ioguix
Copy link
Owner Author

ioguix commented Jul 7, 2022

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.

@MichaelDBA
Copy link

Thanks!

@shangzixie
Copy link

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?

@ioguix
Copy link
Owner Author

ioguix commented Aug 23, 2022

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?

@shangzixie
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants