Retrieve tables sizes asynchronously when opening the catalog.
This commit is contained in:
parent
8fe5e05f7d
commit
39195153cd
8 changed files with 163 additions and 52 deletions
|
|
@ -50,10 +50,6 @@ public:
|
|||
QString viewdef;
|
||||
|
||||
QString description; // from pg_description
|
||||
int64_t totalBytes;
|
||||
int64_t indexBytes;
|
||||
int64_t toastBytes;
|
||||
|
||||
|
||||
using PgNamespaceObject::PgNamespaceObject;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,9 +12,6 @@ std::string PgClassContainer::getLoadQuery() const
|
|||
" reltuples, reltoastrelid, relisshared, relpersistence, "
|
||||
" relkind, relispopulated, relfrozenxid, relminmxid, "
|
||||
" reloptions, d.description, "
|
||||
" pg_total_relation_size(pg_class.oid) AS total_bytes, "
|
||||
" CASE WHEN relkind='r' THEN pg_indexes_size(pg_class.oid) ELSE 0 END AS index_bytes, "
|
||||
" CASE WHEN relkind='r' THEN pg_total_relation_size(reltoastrelid) ELSE 0 END AS toast_bytes, "
|
||||
" relacl, pg_get_viewdef(pg_class.oid)";
|
||||
|
||||
if (lessThenVersion(120000))
|
||||
|
|
@ -41,8 +38,7 @@ PgClass PgClassContainer::loadElem(const Pgsql::Row &row)
|
|||
>> owner >> v.am >> v.filenode >> v.tablespace >> v.pages_est
|
||||
>> v.tuples_est >> v.toastrelid >> v.isshared >> v.persistence
|
||||
>> v.kind >> v.ispopulated >> v.frozenxid >> v.minmxid
|
||||
>> v.options >> v.description >> v.totalBytes >> v.indexBytes >> v.toastBytes;
|
||||
|
||||
>> v.options >> v.description;
|
||||
|
||||
v.setOwnerOid(owner);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue