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-16 15:39:43
Message-ID: 558d0566-54dd-494c-8828-f8087e7f8df4@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/16/24 07:38, HORDER Philip wrote:
> Classified as: {OPEN}
>
>> Did you have chance to do below?
>> Using psql do
>
>> \x
>> select * from pg_stat_all_tables where relname = 'a.accp';
>
> Sorry, missed that bit.
> From this output you can see that no stats have been collected since the last two overnight updates.

Still your contention was that autovacuum quit running after the initial
restore and that is not the case. Assuming this is the instance you
restored on May 2 2024 then approximate counts are:

autovacuum_count 1888/13 days = 145 autovacuums/day = 6/hour

autoanalyze_count 1715/13 = 132 autoanalyze/day = 5.5/hr

>
> postgres=# select * from pg_stat_all_tables where relname='accp';
> -[ RECORD 1 ]-------+--------------------------------
> relid | 811486381
> schemaname | a
> relname | accp
> seq_scan | 1654767
> seq_tup_read | 901811880
> idx_scan | 146070383
> idx_tup_fetch | 305949969
> n_tup_ins | 2056948
> n_tup_upd | 0
> n_tup_del | 1662699
> n_tup_hot_upd | 0
> n_live_tup | 294
> n_dead_tup | 75162
> n_mod_since_analyze | 0
> n_ins_since_vacuum | 75162
> last_vacuum |
> last_autovacuum | 2024-05-15 03:25:16.007386+00
> last_analyze |
> last_autoanalyze | 2024-05-15 03:25:16.008873+00
> vacuum_count | 0
> autovacuum_count | 1888
> analyze_count | 19836
> autoanalyze_count | 1715
>
>
> Phil Horder
> Database Mechanic
>
> Thales
> Land & Air Systems
>
>
> {OPEN}
> The information contained in this e-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. If you have received this e-mail in error, please inform the originator immediately and delete it and all copies from your system.
>
> Thales UK Limited. A company registered in England and Wales. Registered Office: 350 Longwater Avenue, Green Park, Reading, Berks RG2 6GF. Registered Number: 868273
>
> Please consider the environment before printing a hard copy of this e-mail.

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message HORDER Philip 2024-05-16 15:59:03 Re: Restore of a reference database kills the auto analyze processing.
Previous Message HORDER Philip 2024-05-16 14:38:00 Re: Restore of a reference database kills the auto analyze processing.