Document how to customize \d+ to report distributed table sizes
Why are we implementing it? (sales eng)
What are the typical use cases?
People using psql want to use a shortcut to find table size. In psql this shortcut is \d+, which calls pg_catalog.pg_table_size. Currently that size will under-report for distributed tables. We have a custom Citus function people can call for the true size, but it would be easier to fix the default shortcut.
Communication goals (e.g. detailed howto vs orientation)
Give people the sql snippet they can use to fix \d+.
Good locations for content in docs structure
https://docs.citusdata.com/en/stable/admin_guide/table_management.html#determining-table-and-relation-size
How does this work? (devs)
Example sql
https://gist.github.com/marcocitus/cc3cdd528e4d2e8e35b5e75eeca986c6
Corner cases, gotchas
https://gist.github.com/marcocitus/cc3cdd528e4d2e8e35b5e75eeca986c6
At time of linking, that gist does not handle errors. It should catch errors to be sure that orig_table_size gets called in the worst case. Alternately, perhaps Citus could run the snippet during install so nobody would have to think about it?
Check that \d+ still doesn't report the correct value on citus 8.3, so this is still a valid workaround.