fix deprecation mention for age() and mxid_age()

Started by Bertrand Drouvotover 1 year ago7 messageshackers
Jump to latest
#1Bertrand Drouvot
bertranddrouvot.pg@gmail.com

Hi hackers,

48b5aa3143 mentioned age() and mxid_age() as deprecated. As per the discussion in
[1]: /messages/by-id/20231114013224.4z6oxa6p6va33rxr@awork3.anarazel.de

Please find attached a patch to fix this on master and its version for the 17
stable branch backpatch. I think that's worth a backpatch as that could raise
concerns to read that the functions you rely on for monitoring are deprecated
and could generate questions like "will they be removed in PG 18?", "if so, what
is the supported/recommended way to calculate age of transaction id’s?".

Also it looks like that for PG 16, 7471230cc6, did put the functions description
in the "Control Data Functions". That looks unintentional too, so moving it to
"Transaction ID and Snapshot Information Functions" section instead.

Please find attached the 3 patches.

[1]: /messages/by-id/20231114013224.4z6oxa6p6va33rxr@awork3.anarazel.de

Looking forward to your feedback,

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachments:

master_v1-0001-fix-deprecation-mention-for-age-and-mxid_age.patchtext/x-diff; charset=us-asciiDownload+30-29
17stable_v1-0001-fix-deprecation-mention-for-age-and-mxid_age.patchtext/x-diff; charset=us-asciiDownload+30-29
16stable_v1-0001-fix-doc-location-for-age-and-mxid_age.patchtext/x-diff; charset=us-asciiDownload+30-29
#2Michael Paquier
michael@paquier.xyz
In reply to: Bertrand Drouvot (#1)
Re: fix deprecation mention for age() and mxid_age()

On Mon, Nov 18, 2024 at 08:11:57AM +0000, Bertrand Drouvot wrote:

Also it looks like that for PG 16, 7471230cc6, did put the functions description
in the "Control Data Functions". That looks unintentional too, so moving it to
"Transaction ID and Snapshot Information Functions" section instead.

Please find attached the 3 patches.

Even with the monitoring query argument left aside, I agree that there
are more upsides to not list them as deprecated for now, based on the
reason that xid is still a data type in some catalogs, like pg_class's
relfrozenxid and relminmxid. Note as well that we've used them in
vacuumdb.

In short, your suggestion makes sense to me. Any thoughts or comments
from others?
--
Michael

#3Bertrand Drouvot
bertranddrouvot.pg@gmail.com
In reply to: Michael Paquier (#2)
Re: fix deprecation mention for age() and mxid_age()

Hi,

On Tue, Nov 19, 2024 at 10:09:57AM +0900, Michael Paquier wrote:

On Mon, Nov 18, 2024 at 08:11:57AM +0000, Bertrand Drouvot wrote:

Also it looks like that for PG 16, 7471230cc6, did put the functions description
in the "Control Data Functions". That looks unintentional too, so moving it to
"Transaction ID and Snapshot Information Functions" section instead.

Please find attached the 3 patches.

Even with the monitoring query argument left aside, I agree that there
are more upsides to not list them as deprecated for now, based on the
reason that xid is still a data type in some catalogs, like pg_class's
relfrozenxid and relminmxid.

Yeah, and those are most probably the main inputs for age(). In addition,
datminmxid and relminmxid are also xid and most probably the main inputs for
mxid_age().

In short, your suggestion makes sense to me.

Thanks for the feedback!

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

#4Michael Paquier
michael@paquier.xyz
In reply to: Bertrand Drouvot (#3)
Re: fix deprecation mention for age() and mxid_age()

On Tue, Nov 19, 2024 at 06:52:40AM +0000, Bertrand Drouvot wrote:

Thanks for the feedback!

Done. The section mistake in REL_16_STABLE was.. Interesting.
--
Michael

#5John Naylor
john.naylor@enterprisedb.com
In reply to: Michael Paquier (#4)
Re: fix deprecation mention for age() and mxid_age()

On Wed, Nov 20, 2024 at 12:23 PM Michael Paquier <michael@paquier.xyz> wrote:

On Tue, Nov 19, 2024 at 06:52:40AM +0000, Bertrand Drouvot wrote:

Thanks for the feedback!

Done. The section mistake in REL_16_STABLE was.. Interesting.

Hi, there is a CF entry for this -- is it ready to mark committed?

--
John Naylor
Amazon Web Services

#6Michael Paquier
michael@paquier.xyz
In reply to: John Naylor (#5)
Re: fix deprecation mention for age() and mxid_age()

On Wed, Dec 11, 2024 at 06:54:23AM +0700, John Naylor wrote:

Hi, there is a CF entry for this -- is it ready to mark committed?

Oops. I've missed that there was an entry in CF 51. Updated that
now. Thanks for the poke.
--
Michael

#7Bertrand Drouvot
bertranddrouvot.pg@gmail.com
In reply to: Michael Paquier (#6)
Re: fix deprecation mention for age() and mxid_age()

Hi,

On Wed, Dec 11, 2024 at 09:01:24AM +0900, Michael Paquier wrote:

On Wed, Dec 11, 2024 at 06:54:23AM +0700, John Naylor wrote:

Hi, there is a CF entry for this -- is it ready to mark committed?

Oops. I've missed that there was an entry in CF 51. Updated that
now. Thanks for the poke.

D'oh I missed it too!

Thanks for the poke.

+1

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com