Re: About Autovacuum Query

From: Rajesh Kumar <rajeshkumar(dot)dba09(at)gmail(dot)com>
To: jaya kumar <kumardba27(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: About Autovacuum Query
Date: 2024-04-03 11:01:03
Message-ID: CAJk5AtZm4fnK70HAxMK=Ps4e00Br8rkcQK1Cb6O0ok58y0594g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Autovacuum will vaccum based on the parameter set periodically. You can't
keep 0 dead tuple all the time. Check the percentage of dead tuple.

On Wed, 3 Apr 2024, 15:25 jaya kumar, <kumardba27(at)gmail(dot)com> wrote:

> Hi Team,
>
> In my database Autovacuum is enabled and sets the below updated value in
> the Autovacuum related parameter. Here my question is after performing
> Autovacuum on a daily basis the below value is coming in n_dead_tup. If I
> will manually Autovacuum then it's fine.
>
> Can someone help me to solve my request? The below current parameter
> setting updated
>
> databaseName=# show autovacuum;
> autovacuum
> ------------
> on
> (1 row)
>
> databaseName=# show autovacuum_vacuum_threshold;
> autovacuum_vacuum_threshold
> -----------------------------
> 50
> (1 row)
>
> databaseName=# show autovacuum_vacuum_scale_factor;
> autovacuum_vacuum_scale_factor
> --------------------------------
> 0.2
> (1 row)
>
> databaseName=# show autovacuum_vacuum_cost_delay;
> autovacuum_vacuum_cost_delay
> ------------------------------
> 2ms
> (1 row)
>
> databaseName=#
>
>
>
> databaseName=# /
> tblnam | n_dead_tup | pfrag
> --------------------------+------------+---------
> applicationusername.tablename1 | 52625 | 5262500
> applicationusername.tablename2 | 23538 | 2353800
> applicationusername.tablename3 | 3290 | 329000
> applicationusername.tablename4 | 3092 | 309200
> applicationusername.tablename5 | 2262 | 226200
> applicationusername.tablename6 | 2110 | 211000
> applicationusername.tablename7 | 678 | 67800
> applicationusername.tablename8 | 491 | 49100
> applicationusername.tablename9 | 431 | 43100
> applicationusername.tablenam10 | 351 | 35100
> applicationusername.tablenam11 | 188 | 18800
> applicationusername.tablenam12 | 150 | 15000
>
>
> --
> Thanks & Regards,
> Jayakumar.S
> +91-9840864439.
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2024-04-03 13:19:43 Re: About Autovacuum Query
Previous Message Rajesh Kumar 2024-04-03 10:30:17 Trigger