Re: Timeline ID hexadecimal format

From: Greg Stark <stark(at)mit(dot)edu>
To: Sébastien Lardière <sebastien(at)lardiere(dot)net>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Timeline ID hexadecimal format
Date: 2023-01-31 19:16:06
Message-ID: CAM-w4HPnR=y3-FVY9YJvDUA=-hJPSN70yW9c0yeDvy2nHO-rVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I actually find it kind of annoying that we use hex strings for a lot
of things where they don't add any value. Namely Transaction ID and
LSNs. As a result it's always a bit of a pain to ingest these in other
tools or do arithmetic on them. Neither is referring to memory or
anything where powers of 2 are significant so it really doesn't buy
anything in making them easier to interpret either.

I don't see any advantage in converting every place where we refer to
timelines into hex and then having to refer to things like timeline
1A. It doesn't seem any more intuitive to someone understanding what's
going on than referring to timeline 26.

The fact that the *filename* has it encoded in hex is an
implementation detail and really gets exposed here because it's giving
you the underlying system error that caused the problem. The confusion
only arises when the two are juxtaposed. A hint or something just in
that case might be enough?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2023-01-31 19:25:37 Re: [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt().
Previous Message Tom Lane 2023-01-31 18:52:21 Re: Clarify deleting comments and security labels in synopsis