Change behavior of (m)xid_age

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Change behavior of (m)xid_age
Date: 2015-10-21 17:33:55
Message-ID: 5627CC83.4010901@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Currently, xid_age() returns INT_MAX for a permanent xid. The comment in
the function that 'Permanent XIDs are always infinitely old' may be
technically correct, but returning INT_MAX is a useless behavior because
it actually makes it look like that XID is in immediate wraparound
danger. I think we should change it to return either 0, -1, or INT_MIN.
To me, 0 makes the most sense for monitoring relfrozenxid.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2015-10-21 18:05:13 Re: BUG #13694: Row Level Security by-passed with CREATEUSER permission
Previous Message Jeff Janes 2015-10-21 17:31:26 Re: COPY FREEZE and PD_ALL_VISIBLE