Re: Is Autovacuum running?

Поиск
Список
Период
Сортировка
От Brad White
Тема Re: Is Autovacuum running?
Дата
Msg-id CAA_1=91S7OneyqwqL8guRe=ocz9o9y8at7PDOOXLbhNsYAWY1Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Is Autovacuum running?  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Is Autovacuum running?  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-general
On Tue, Feb 21, 2023 at 2:56 PM David Rowley <dgrowleyml@gmail.com> wrote:
On Tue, 21 Feb 2023 at 08:42, Brad White <b55white@gmail.com> wrote:
>
> I'm concerned that Autovacuum may not be running based on the results of this query.
>
> SELECT relname, last_vacuum, last_autovacuum FROM pg_stat_user_tables;
> gives 211 rows like this...
> relname                    | last_vacuum | last_autovacuum
> BusinessIncidentCategories | null | null
> Valid Use                  | null | null
> Serial Pool Part Types     | null | null
> BusinessIncidentLog        | null | null
> Rate Categories            | null | null

It's probably worth having a look at:

select datname,stats_reset,now() from pg_stat_database where datname =
current_database();

while you're connected to the database with those tables. If you're
resetting the stats, then that resets the counters used by autovacuum
and also the columns you mention above. That can lead to autovacuum
not doing any vacuuming or analyzing.

Well that explains a lot.

datname | stats_reset            | now
DB      | 2023-02-17 14:28:27-06 | 2023-02-21 16:16:34-06

I heard that the system was running slowly on Friday. They may have cycled the service in an attempt to resolve that.

I went ahead and ran ANALIZE. We'll see if that affects anything.

Thanks,
Brad.

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

Предыдущее
От: Cathy Xie
Дата:
Сообщение: Debugging postgres on Windows - could not open directory "/lib"
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Debugging postgres on Windows - could not open directory "/lib"