Re: Statistics Import and Export

Поиск
Список
Период
Сортировка
От Corey Huinker
Тема Re: Statistics Import and Export
Дата
Msg-id CADkLM=ddbXvLjURK4RxEG2_ntSCoq17u_WHsUR19KEpEGQvmZA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Statistics Import and Export  (Melanie Plageman <melanieplageman@gmail.com>)
Ответы Re: Statistics Import and Export
Список pgsql-hackers
+--- error: relation is wrong type
+SELECT pg_catalog.pg_restore_relation_stats(
+        'relation', 0::oid,
+        'relpages', 17::integer,
+        'reltuples', 400.0::real,
+        'relallvisible', 4::integer);

Why do you need to specify all the stats (relpages, reltuples, etc)?
To exercise this you could just do:
select pg_catalog.pg_restore_relation_stats('relation', 0::oid);

In the above case, it's historical inertia in that the pg_set_* call required all those parameters, as well as a fear that the code - now or in the future - might evaluate "can anything actually change from this call" and short circuit out before actually trying to make sense of the reg_class oid. But we can assuage that fear with just one of the three stat parameters, and I'll adjust accordingly.
 
Since I haven't been following along with this feature development, I
don't think I can get comfortable enough with all of the changes in
this test diff to commit them. I can't really say if this is the set
of tests that is representative and sufficient for this feature.

That's fine, I hadn't anticipated that you'd review this patch, let alone commit it.
 
If you agree with me that the failure tests could be shorter, I'm
happy to commit that, but I don't really feel comfortable assessing
what the right set of full tests is.

The set of tests is as short as I feel comfortable with. I'll give the parameter lists one more pass and repost.

В списке pgsql-hackers по дате отправления: