On Thu, Jul  5, 2018 at 01:30:22PM -0700, Peter Geoghegan wrote:
> On Thu, Jul 5, 2018 at 12:36 PM, Robert Haas <robertmh...@gmail.com> wrote:
> > On Sun, Jul 1, 2018 at 11:18 PM, David Rowley
> > <david.row...@2ndquadrant.com> wrote:
> >> I see d692308cf494f6126 mentions mxid_age() in passing, but there
> >> appears to be no formal definition of either of these functions.
> >>
> >> Should there be?
> >
> > It seems like a good idea to me.
> 
> +1

I looked into this and all the 4-byte xid functions are marked as
deprecated for the 8-byte variants.  I don't think documenting 4-byte
mxid_age() and age(xid) makes sense anymore, and I don't see their value
enough to create 8-byte versions, so I just added C comments that they
were undocumented, in the attached patch.

-- 
  Bruce Momjian  <br...@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.
diff --git a/src/backend/utils/adt/xid.c b/src/backend/utils/adt/xid.c
index 8ac1679c38..d2c637195c 100644
--- a/src/backend/utils/adt/xid.c
+++ b/src/backend/utils/adt/xid.c
@@ -98,6 +98,7 @@ xidneq(PG_FUNCTION_ARGS)
 
 /*
  *		xid_age			- compute age of an XID (relative to latest stable xid)
+ * This supports only 4-byte XIDs and is undocumented.
  */
 Datum
 xid_age(PG_FUNCTION_ARGS)
@@ -114,6 +115,7 @@ xid_age(PG_FUNCTION_ARGS)
 
 /*
  *		mxid_age			- compute age of a multi XID (relative to latest stable mxid)
+ * This supports only 4-byte XIDs and is undocumented.
  */
 Datum
 mxid_age(PG_FUNCTION_ARGS)

Reply via email to