| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
|---|---|
| To: | Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: enhance wraparound warnings |
| Date: | 2026-03-03 20:31:25 |
| Message-ID: | aadFHfocomG20wgM@nathan |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Feb 18, 2026 at 04:16:16PM +0900, Shinya Kato wrote:
> On Sat, Nov 15, 2025 at 2:05 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>> I don't know about you, but I start getting antsy around a quarter tank.
>> In any case, I'm told that even 40M transactions aren't enough time to
>> react these days. Attached are a few patches to enhance the wraparound
>> warnings.
>
> Thank you for the patch!
Thanks for reviewing.
> I don't have a strong opinion on whether 100M is the right value, but
> I noticed a documentation issue in 0002.
>
> <programlisting>
> WARNING: database "mydb" must be vacuumed within 39985967 transactions
> DETAIL: Approximately 1.86% of transaction IDs are available for use.
> HINT: To avoid XID assignment failures, execute a database-wide
> VACUUM in that database.
> </programlisting>
>
> In maintenance.sgml, above "39985967" and "1.86%" should be updated.
Fixed.
> I'm not sure 0003 is worth the added complexity. It adds a new field
> to TransamVariablesData and a modulo check in GetNewTransactionId(),
> which is a hot path. DBAs who need early warning can already monitor
> age(datfrozenxid) with more flexible thresholds.
Yeah, looking at this one again, I'm less sure it's worth pursuing. I've
removed it.
--
nathan
| Attachment | Content-Type | Size |
|---|---|---|
| v4-0001-Add-percentage-of-transaction-IDs-that-are-availa.patch | text/plain | 5.9 KB |
| v4-0002-Bump-transaction-ID-limit-to-warn-at-100M.patch | text/plain | 4.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2026-03-03 20:48:26 | Re: Is it OK to perform logging while holding a LWLock? |
| Previous Message | Melanie Plageman | 2026-03-03 20:07:17 | Re: Don't synchronously wait for already-in-progress IO in read stream |