Re: Any plans to expose publicly (via stored proc) relation_needs_vacanalyze, or some flavour of do_autovacuum?
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Any plans to expose publicly (via stored proc) relation_needs_vacanalyze, or some flavour of do_autovacuum? |
| Дата | |
| Msg-id | 23577.1284429711@sss.pgh.pa.us обсуждение |
| Ответ на | Any plans to expose publicly (via stored proc) relation_needs_vacanalyze, or some flavour of do_autovacuum? (Vlad Romascanu <vromascanu@accurev.com>) |
| Список | pgsql-general |
Vlad Romascanu <vromascanu@accurev.com> writes:
> The logical, amended solution would then be to have the "writer"
> session perform, after INSERTion but before COMMITTing, the same
> calculation that the autovacuum daemon currently performs inside
> relation_needs_vacanalyze, based on the same configuration parameters
> that the autovacuum daemon uses, before deciding whether to explicitly
> ANALYZE or not the affected application tables. Ideally one would not
> want to duplicate the relation_needs_vacanalyze logic (not to mention
> having to guess the value of last_anl_tuples, which is not exposed via
> any storedproc -- one would have to assume that it is more or less
> equivalent to pg_class.reltuples.)
I don't know if you actually looked at that code, but it's driven off of
statistics counters that are only updated at commit; and furthermore are
maintained in a different process altogether. So what you have in mind
isn't going to work ...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера