Why might autovacuum not be analyzing chk_image_rp4_y2025m08? - Mailing list pgsql-admin

From Ron Johnson
Subject Why might autovacuum not be analyzing chk_image_rp4_y2025m08?
Date
Msg-id CANzqJaAunnZnjBtYgFk0wBSVonA9=i2cNj8Aa3oBKRTK9SNaTQ@mail.gmail.com
Whole thread Raw
List pgsql-admin
PG 16.9

No messages like this in the log file:
LOG:  55P03: skipping analyze of "chk_image_rp4_y2025m08" --- lock not available

(The queries below are from a view joining pg_stat_user_tables and pg_class.)

postgres=# select name, setting from pg_settings where name like 'autovacuum%' order by name;
                 name                  |  setting  
---------------------------------------+-----------
 autovacuum                            | on
 autovacuum_analyze_scale_factor       | 0.03
 autovacuum_analyze_threshold          | 50
 autovacuum_freeze_max_age             | 200000000
 autovacuum_max_workers                | 6
 autovacuum_multixact_freeze_max_age   | 400000000
 autovacuum_naptime                    | 60
 autovacuum_vacuum_cost_delay          | 4
 autovacuum_vacuum_cost_limit          | 500
 autovacuum_vacuum_insert_scale_factor | 0.03
 autovacuum_vacuum_insert_threshold    | 500
 autovacuum_vacuum_scale_factor        | 0.03
 autovacuum_vacuum_threshold           | 50
 autovacuum_work_mem                   | -1
(14 rows)


2025-08-29 16:54:14.383
       table_name       | latest_analyze  | mod_ana | reltuples | mod_pct
------------------------+-----------------+---------+-----------+---------
 chk_image_rp1_y2025w34 | 07:01:20.265676 |      24 |       371 |    6.47
 chk_image_rp3_y2025m08 | 11:48:52.968676 |       6 |        39 |   15.38
 chk_image_rp4_y2025m08 | 01:13:59.213676 |    2976 |     97747 |    3.04
 chk_image_rp6_y2025m08 | 11:48:53.055676 |       6 |       135 |    4.44
 chk_image_rp7_y2025m08 | 07:03:20.206676 |       7 |       132 |    5.30
(5 rows)

2025-08-29 16:55:14.704
       table_name       |latest_analyze | mod_ana | reltuples | mod_pct
------------------------+---------------+---------+-----------+---------
 chk_image_rp1_y2025w34 |07:02:20.58316 |      24 |       371 |    6.47
 chk_image_rp3_y2025m08 |11:49:53.28616 |       6 |        39 |   15.38
 chk_image_rp4_y2025m08 |01:14:59.53116 |    2977 |     97747 |    3.05
 chk_image_rp6_y2025m08 |11:49:53.37316 |       6 |       135 |    4.44
 chk_image_rp7_y2025m08 |07:04:20.52416 |       7 |       132 |    5.30
(5 rows)

2025-08-29 16:56:15.023
       table_name       | latest_analyze  | mod_ana | reltuples | mod_pct
------------------------+-----------------+---------+-----------+---------
 chk_image_rp1_y2025w34 | 07:03:20.908004 |      24 |       371 |    6.47
 chk_image_rp3_y2025m08 | 11:50:53.611004 |       6 |        39 |   15.38
 chk_image_rp4_y2025m08 | 01:15:59.856004 |    2977 |     97747 |    3.05
 chk_image_rp6_y2025m08 | 11:50:53.698004 |       6 |       135 |    4.44
 chk_image_rp7_y2025m08 | 07:05:20.849004 |       7 |       132 |    5.30
(5 rows)

 2025-08-29 16:57:15.344
       table_name       | latest_analyze  | mod_ana | reltuples | mod_pct
------------------------+-----------------+---------+-----------+---------
 chk_image_rp1_y2025w34 | 07:04:21.223701 |      24 |       371 |    6.47
 chk_image_rp3_y2025m08 | 11:51:53.926701 |       6 |        39 |   15.38
 chk_image_rp4_y2025m08 | 01:17:00.171701 |    2977 |     97747 |    3.05
 chk_image_rp6_y2025m08 | 11:51:54.013701 |       6 |       135 |    4.44
 chk_image_rp7_y2025m08 | 07:06:21.164701 |       7 |       132 |    5.30
(5 rows)

2025-08-29 16:58:15.662
       table_name       | latest_analyze  | mod_ana | reltuples | mod_pct
------------------------+-----------------+---------+-----------+---------
 chk_image_rp1_y2025w34 | 07:05:21.542831 |      24 |       371 |    6.47
 chk_image_rp3_y2025m08 | 11:52:54.245831 |       6 |        39 |   15.38
 chk_image_rp4_y2025m08 | 01:18:00.490831 |    2977 |     97747 |    3.05
 chk_image_rp6_y2025m08 | 11:52:54.332831 |       6 |       135 |    4.44
 chk_image_rp7_y2025m08 | 07:07:21.483831 |       7 |       132 |    5.30
(5 rows)
[snip]
2025-08-29 17:08:18.849
       table_name       | latest_analyze  | mod_ana | reltuples | mod_pct
------------------------+-----------------+---------+-----------+---------
 chk_image_rp1_y2025w34 | 07:15:24.727084 |      24 |       371 |    6.47
 chk_image_rp3_y2025m08 | 12:02:57.430084 |       6 |        39 |   15.38
 chk_image_rp4_y2025m08 | 01:28:03.675084 |    2977 |     97747 |    3.05
 chk_image_rp6_y2025m08 | 12:02:57.517084 |       6 |       135 |    4.44
 chk_image_rp7_y2025m08 | 07:17:24.668084 |       7 |       132 |    5.30
(5 rows)

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Having trouble passing a shell variable to a query from psql command line
Next
From: Ron Johnson
Date:
Subject: Re: Having trouble passing a shell variable to a query from psql command line