Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tIrfT-00H9I9-MY for pgsql-general@arkaria.postgresql.org; Wed, 04 Dec 2024 15:51:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tIrfQ-000m7T-Mg for pgsql-general@arkaria.postgresql.org; Wed, 04 Dec 2024 15:51:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tIrfQ-000m7L-5R for pgsql-general@lists.postgresql.org; Wed, 04 Dec 2024 15:51:57 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tIrfO-0011yP-Ql for pgsql-general@lists.postgresql.org; Wed, 04 Dec 2024 15:51:56 +0000 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-aa51d32fa69so1042693166b.2 for ; Wed, 04 Dec 2024 07:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetbrains.com; s=googleapps; t=1733327512; x=1733932312; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=jszAIeBijL7VBg7HecFWbcc4HbuF37H38U58VCvkd+8=; b=eJhWrS+Z9IhWEmTDRE3HaBYs527WupyMbB996BOY6sv/gzDvyCmMfkf/4nt/775kuP Av8I4xI+X9L5tAhY5dQe3/upfAjXgH0RbTxbsNRNl+6y2QMPD6IqDq9dIDLN3Ec09jzR uTOyNs9AwoKEagVTMbjnLz2RmCYdJ+NkqonFQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733327512; x=1733932312; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jszAIeBijL7VBg7HecFWbcc4HbuF37H38U58VCvkd+8=; b=XjESkcSZH+oJnSTZJXBXvAPPK9/mFouy33tZ3QbSIq2Esz6mZffE3TVAa7UmCz094W +a/rPltgp4hjAFtEK4VqsNxxBm0OCXYxLyqgq9wlOa1D71863nAuWjvqwAGZFGsQulTi 1P6AC49hbgWECBLNjpYAmbuxNkFpIwWw0Fd27p0VzugSAzOPit87fKn0QK/Tm+MFLQts BRgPN4uqIdEqlGXWgzLtjTFRBWHZbYRUc7C3bhcYVsJ/54WsUJqbZdGKjiQ/d+UuFl13 E2Cz0Oi8sE7+UfBF+3CIkT4WSywgRKg4G6bgNVentfTmIS9LsndVjbVti+/C6OUjAwTM i5qQ== X-Gm-Message-State: AOJu0YxaEtNtbJvRLEBtgBmLK0FjgLTggq1LIbizGx7qg5MEj7jJEYt8 oA+acnJdKkI3lK0BrE3bYP5gvB07DOEpWN42AvL4917BfdytHD3lhsxcrhF9fJI4MuTJOw6NHgc udGVqBVzKMBnfwuUFfaj1oLr+I8tsebNc3ffGyDXGABbLXVGmEg== X-Gm-Gg: ASbGncuCKJOSu17iBNTk14HYkt04SepGWGPZoJTcfMGFpAWoN5iPjaVboBcUv9g18dr SHnETP9uYrD2k1wC6jZ8UNAcQbZ6Tug== X-Google-Smtp-Source: AGHT+IE2tKVE7IXQ6hWonXIgEKg0BPDfyEEuRMIAYbIQHLmGBFdZNXBtzzuM1ZcqpWqzHeZ2u4G+q0j68+Uyz3aMvsg= X-Received: by 2002:a17:907:762d:b0:aa5:29b8:15ce with SMTP id a640c23a62f3a-aa5f7f3c495mr586665266b.56.1733327511981; Wed, 04 Dec 2024 07:51:51 -0800 (PST) MIME-Version: 1.0 From: Ivan Shershnev Date: Wed, 4 Dec 2024 16:51:41 +0100 Message-ID: Subject: Seamless age (xid) replacement To: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000a1be06062873c294" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a1be06062873c294 Content-Type: text/plain; charset="UTF-8" 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 --000000000000a1be06062873c294 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello!

I need to use the = 9;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()', w= hich replaced 'txid_current()', but cannot use it right away with &= #39;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) &#= 39;age' is anyway deprecated.

I can re-impleme= nt 'age' by myself. It's (mostly) a subtraction after all. But = it would mean that I inline implementation in place of "api" func= tion call which is not always a great idea.

Could = anyone advise, please?

Kind regards,
Iva= n
--000000000000a1be06062873c294--