Re: Eagerly scan all-visible pages to amortize aggressive vacuum - Mailing list pgsql-hackers

From Pavel Luzanov
Subject Re: Eagerly scan all-visible pages to amortize aggressive vacuum
Date
Msg-id a67861d4-fb7d-457d-8e72-82d0377c7566@postgrespro.ru
Whole thread Raw
In response to Re: Eagerly scan all-visible pages to amortize aggressive vacuum  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: Eagerly scan all-visible pages to amortize aggressive vacuum
List pgsql-hackers
Hello,

I have a question about the documentation.

 From description of the vacuum_max_eager_freeze_failure_rate [1]

"Specifies the maximum number of pages (as a fraction of total pages in 
the relation) that VACUUM may scan and fail to set all-frozen in the 
visibility map before disabling eager scanning."

It seems that after reaching the vacuum_max_eager_freeze_failure_rate, 
the eager scanning of this table will be stopped. But in the source code 
[2]:

  * cap. The failure count is reset for each region of the table -- 
comprised
  * of EAGER_SCAN_REGION_SIZE blocks. In each region, we tolerate
  * vacuum_max_eager_freeze_failure_rate of EAGER_SCAN_REGION_SIZE failures
  * before suspending eager scanning until the end of the region.

 From this description, vacuum_max_eager_freeze_failure_rate limit 
applies to a region of EAGER_SCAN_REGION_SIZE pages, but not to the 
whole table.

Which one is correct? May be I'm missing something?
Do we need any clarifications in the documentation?

1. 
https://www.postgresql.org/docs/devel/runtime-config-vacuum.html#GUC-VACUUM-MAX-EAGER-FREEZE-FAILURE-RATE
2. 

https://github.com/postgres/postgres/blob/3357471cf9f5e470dfed0c7919bcf31c7efaf2b9/src/backend/access/heap/vacuumlazy.c#L82-L85

-- 
Pavel Luzanov
Postgres Professional: https://postgrespro.com




pgsql-hackers by date:

Previous
From: Ajin Cherian
Date:
Subject: Re: 024_add_drop_pub.pl might fail due to deadlock
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: POC: enable logical decoding when wal_level = 'replica' without a server restart