public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ivan Shershnev <[email protected]>
To: [email protected]
Subject: Seamless age (xid) replacement
Date: Wed, 4 Dec 2024 16:51:41 +0100
Message-ID: <CAJjhk3Divm6hpx395nJFdN2J_ytpFVbmOp00GWOtE7D=ppVzAA@mail.gmail.com> (raw)
Hello!
I need to use the 'age (xid)' function, but I have noticed that it is
deprecated without a clear alternative. I know that xid is also kinda
deprecated, so it makes sense not to use it. I can get xid8 from
'pg_current_xact_id()', which replaced 'txid_current()', but cannot use it
right away with 'age'.
I can cast xid8 that I've got to xid and pass to 'age', but 1) I have no
idea if it's the right way, i.e. it's promised to work or will work anyway
by accident, 2) 'age' is anyway deprecated.
I can re-implement 'age' by myself. It's (mostly) a subtraction after all.
But it would mean that I inline implementation in place of "api" function
call which is not always a great idea.
Could anyone advise, please?
Kind regards,
Ivan
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Seamless age (xid) replacement
In-Reply-To: <CAJjhk3Divm6hpx395nJFdN2J_ytpFVbmOp00GWOtE7D=ppVzAA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox