Re: pgsql: Move various prechecks from vacuum() into ExecVacuum()

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: pgsql: Move various prechecks from vacuum() into ExecVacuum()
Дата
Msg-id CAApHDvpHxPsuWtfjxjxaiuTVTHHRiNKWB3dVUtSr2XDj5B9XhA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Move various prechecks from vacuum() into ExecVacuum()  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-committers
On Thu, 6 Apr 2023 at 16:04, Michael Paquier <michael@paquier.xyz> wrote:
> I have just seen this commit, and I am pretty sure that the checks
> have been placed in vacuum() to guard against incorrect option
> manipulations in the context of an autovacuum building the relations,
> so you are making this code weaker with the cross-checks it had, IMO.
> This is particularly relevant in some areas with toast relations, for
> example, because autovacuum handles the toast and their parents
> separately, contrary to ExecVacuum() that would group them together by
> default.

hmm, I'm not sure I agree that would warrant keeping ereport()s in
vacuum().  Autovacuum would have to set either VACOPT_FULL to possibly
trigger the first two moved ereport()s and the final 2 would need
VACOPT_ONLY_DATABASE_STATS. None of those are ever set by auto-vacuum,
so it seems unlikely that some logic somewhere like
relation_needs_vacanalyze().

Asserts() might be a good compromise.

David



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pgsql: Move various prechecks from vacuum() into ExecVacuum()
Следующее
От: Etsuro Fujita
Дата:
Сообщение: pgsql: postgres_fdw: Add support for parallel abort.