Do stuck replication slots prevent autovacuum of running entirely?
Do stuck replication slots prevent autovacuum of running entirely?
От:
Marcelo Fernandes <marcefern7@gmail.com>
Дата:
Hi there, I am trying to understand if a stuck replication slot would be sufficient to stop an autovacuum of even starting. Couldn't the autovacuum process start, but fail to remove dead tuples that are still necessary by the replication slot? Why would it prevent autovacuum of even starting instead? Thanks.
Re: Do stuck replication slots prevent autovacuum of running entirely?
От:
Laurenz Albe <laurenz.albe@cybertec.at>
Дата:
On Wed, 2025-05-21 at 16:34 +1200, Marcelo Fernandes wrote: > I am trying to understand if a stuck replication slot would be sufficient to > stop an autovacuum of even starting. > > Couldn't the autovacuum process start, but fail to remove dead tuples that > are still necessary by the replication slot? Why would it prevent autovacuum > of even starting instead? I cannot think of a reason why an abandoned replication slot (not sure what you mean with "stuck") would keep an autovacuum worker from starting. Typical reasons why autovacuum doesn't start running on a table are: - there are already "autovacuum_max_workers" worker processes running - the thresholds for dead or inserted tuples have not been crossed - the statistics collector has a problem and doesn't gather statistics; this applies mostly to v14 and older, see https://www.cybertec-postgresql.com/en/stale-statistics-cause-table-bloat/ - the parameter "track_activities" was disabled, so that PostgreSQL doesn't collect statistics - the functions "pg_stat_reset" or "pg_stat_reset_single_table_counters" are called repeatedly and wipe out table statistics Yours, Laurenz Albe