| From: | Sami Imseih <samimseih(at)gmail(dot)com> |
|---|---|
| To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
| Cc: | wenhui qiu <qiuwenhuifx(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Experimental patch for terminating VACUUM freeze blockers |
| Date: | 2026-05-13 19:55:00 |
| Message-ID: | CAA5RZ0sNvP-ia8YKzCqKhxnxBVaV2zsB7Nds6CT7uA6s2Ba9fA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Wed, May 13, 2026 at 07:56:43PM +0800, wenhui qiu wrote:
> > I have an experimental patch to explore handling this situation. The patch
> > adds a GUC, vacuum_freeze_terminate_blockers_pid, which allows VACUUM to
> > terminate regular client backends whose transaction horizon blocks VACUUM
> > from advancing its freeze cutoff. The intended targets are
> > idle-in-transaction sessions and long-running active transactions that are
> > holding an old xmin or assigned XID.
>
> Thanks for sharing. I certainly agree that this area has room for
> improvement in Postgres.
My 2c. Using something like the proposed
vacuum_freeze_terminate_blockers_pid (GUC name is misleading, since
it's a bool )
seems backwards to me. It does not address the root cause, which is
the long-running
transaction, etc and attempts to deal with the symptom rather than the problem.
This also means a poor configuration of this parameter will more
likely lead to a system
silently getting into wraparound, as a DBA may relax a bit on monitoring, maybe.
I do think we need better visibility into what is blocking vacuum, which was
discussed here [1], but ultimately it is up to the DBA to properly monitor
and mitigate workloads that are impacting their vacuum.
--
Sami Imseih
Amazon Web Services (AWS)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2026-05-13 20:20:21 | Re: Avoid orphaned objects dependencies, take 3 |
| Previous Message | Dmitry Dolgov | 2026-05-13 18:08:02 | Re: Add ssl_(supported|shared)_groups to sslinfo |