| From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
|---|---|
| To: | shihao zhong <zhong950419(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Fix autovacuum freeze bug where weight can lower a table's freeze score |
| Date: | 2026-09-01 04:10:37 |
| Message-ID: | CALj2ACVt5e8kJAxqzWRO+t+=xRk6tpRd3yDPFRr7VKE_GCSabw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Mon, Aug 31, 2026 at 8:57 PM shihao zhong <zhong950419(at)gmail(dot)com> wrote:
>
> Hi hackers,
>
> In the autovacuum freeze scores added by d7965d65fc5, raising a freeze
> weight can make a table's score smaller instead of larger. When a table
> gets old, its score is raised to a power to grow fast, but a larger weight
> makes this start while the score is still below one, where a power makes it
> smaller. So a bigger weight can push a table near wraparound down the list.
> The safety net still works; only the order changes.
>
> The attached patch raises the score to a power only when that makes it
> bigger, with a test. New in v19, so no backport needed.
Thanks for reporting this. This is already being discussed here:
https://www.postgresql.org/message-id/apWcbq91BAfhmsKU%40nathan. The
TAP test case looks interesting and will definitely be useful. You may
want to propose it in that thread or here.
--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zhijie Hou (Fujitsu) | 2026-09-01 04:13:10 | RE: Introduce XID age based replication slot invalidation |
| Previous Message | Peter Smith | 2026-09-01 04:00:07 | Code-comment typos. |