Re: Restore of a reference database kills the auto analyze processing.

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: HORDER Philip <Phil(dot)Horder(at)uk(dot)thalesgroup(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Restore of a reference database kills the auto analyze processing.
Date: 2024-05-21 21:52:03
Message-ID: ddac796c-fe21-478f-be5d-a5944b6722d8@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/21/24 13:44, HORDER Philip wrote:
> Classified as: {OPEN}
>
> 2024-05-15 03:31:31.290 GMT [4556]: [3-1]
> db=lfm,user=superuser,app=[unknown],client=::1 LOG: connection
> authorized: user=superuser database=lfm application_name=pg_restore
>
>> That would be the lfm database being restored.
>> What does the log show after that as pertains to autovacuum?
>
> Yep, pg_restore recreates the dropped lfm database.
> And after that.... nothing.
> The log just holds connection requests, and a checkpoint every hour.
> That's it.
> No "automatic vacuum", or "automatic analyze" anywhere.
> And nothing any day since then, for a week.

Just for confirmation your settings are still?:

autovacuum_max_workers = 10
log_autovacuum_min_duration = 0

You said previously:

"The only way I can find of getting the analyzer back is to restart
Postgres."

To be clear this means:

1) The lfm database is dropped/created.

2) There is a round of autovacuum immediately after the lfm is restored.

3) autovacuum then goes silent.

4) Before the next drop/create lfm you restart the Postgres server and
autovacuum starts again.

What is in the logs when you do the restart?

Is there some process that runs shortly after the drop/create lfm cycle?

>
> Phil Horder
> Database Mechanic
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dmitry O Litvintsev 2024-05-21 23:29:24 Confusing error message in 15.6
Previous Message Senor Cervesa 2024-05-21 21:46:15 vacuum an all frozen table