Re: Autovacuum------Doubts

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Autovacuum------Doubts
Дата
Msg-id 42e852495e19c1de2e734a666ae30d9b3e37abe1.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Autovacuum------Doubts  (jaya kumar <kumardba27@gmail.com>)
Ответы Re: Autovacuum------Doubts  (jaya kumar <kumardba27@gmail.com>)
Список pgsql-admin
On Mon, 2024-04-08 at 16:25 +0530, jaya kumar wrote:
> I am not clear.

I can confirm that.

> Could you explain again. If I delete 20 records out of 100. It means Autocacumm should run
> but not run automatically. As you provide a solution, the method should be deleted but does not happen.

If you delete 20 rows, autovacuum should not run.

> Delete record=30
>  
>  autovacuum_vacuum_threshold + autovacuum_vacuum_scale_factor * number of table rows ?
>   o/p: 20+0.1*100=2010?

I don't know what an o/p is, but that calculation is wrong.

> DatabaseName=# show autovacuum_vacuum_threshold;
>  autovacuum_vacuum_threshold
> -----------------------------
>  20
> (1 row)
>  
> DatabaseName=# show autovacuum_vacuum_scale_factor;
>  autovacuum_vacuum_scale_factor
> --------------------------------
>  0.1
> (1 row)
>  
> DatabaseName=# select count(*) from emp9;
>  count
> -------
>    100
> (1 row)
>
> DatabaseName=# delete from emp9 where eno between 1 and 30;

Try deleting 31 or 32 rows.
Statistics are not necessarily 100% accurate.

> On Mon, Apr 8, 2024 at 3:15 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
> > On Mon, 2024-04-08 at 14:57 +0530, jaya kumar wrote:
> > > autovacuum_analyze_threshold and autovacuum_vacuum_threshold both parameter
> > > values set from 50 to 20.
> > >
> > > Created one table with 100 records. First, we deleted 21 records. after an
> > > autovacuum does not happen automatically. After again I deleted another 20.
> > > Out of 100 we delectated 40 records then the autovacuum happened automatically.
> > > As per the configuration Autocacuum will automatically delete 21 records
> > > in the table but my case does not happen.
> > >
> > > Can someone check and explain this.
> >
> > The threshold is
> >
> >   autovacuum_vacuum_threshold + autovacuum_vacuum_scale_factor * number of table rows
> >
> > So since you have set autovacuum_vacuum_scale_factor to 0.1 and there are 100 rows,
> > you need to delete 20 + 100 * 0.1 = 30 rows before autovacuum kicks in.

Please bottom-post.

Yours,
Laurenz Albe



В списке pgsql-admin по дате отправления:

Предыдущее
От: Ibrahim Shaame
Дата:
Сообщение: [MASSMAIL]Can't install pgadmin4 - 8.5 from sources
Следующее
От: Murthy Nunna
Дата:
Сообщение: [MASSMAIL]Output shell variable from psql