Re: POC: make mxidoff 64 bits

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Alexander Lakhin <exclusion(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, wenhui qiu <qiuwenhuifx(at)gmail(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: POC: make mxidoff 64 bits
Date: 2026-02-25 17:38:43
Message-ID: 202602251713.b75colqoticz@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2026-Feb-25, Maxim Orlov wrote:

> Something of this kind?

Looks vaguely reasonable, without looking too much into the details.
I would prefer to have the callback do the errmsg() directly, so that
SlruReportIOError() can do something like

case SLRU_OPEN_FAILED:
ereport(ERROR,
(errcode_for_file_access(),
SlruCtl->errmsg_for_io_error(whatever),
errdetail("Could not open file \"%s\": %m.", path)));
break;

and the callback is something like

static int
xact_errmsg_for_io_error(const void *opaque_data)
{
TransactionId xid;

xid = opaque_data ? (*(TransactionId *) opaque_data) : InvalidTransactionId;
return errmsg("could not access status of transaction %u", xid);
}

We have various errdetail() routines of this kind.

Alternatively, maybe we could report in errmsg() the file operation that
failed, and the XID details etc as part of an error_context_stack
callback. The error reporting style we're using here is perhaps not
well adapted to the times.

> Should we start a new thread?

I think so, yeah.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"¿Qué importan los años? Lo que realmente importa es comprobar que
a fin de cuentas la mejor edad de la vida es estar vivo" (Mafalda)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Srirama Kucherlapati 2026-02-25 17:41:44 RE: AIX support
Previous Message Pavel Borisov 2026-02-25 17:24:54 Re: New isolation test insert-conflict-do-update-4 outputs rows in alternative ordering