Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators
Date
Msg-id CAExHW5v20Y=RiDDO3W2YXLAh0MKW7=cSU980Ygt6Rx-d3vATNw@mail.gmail.com
Whole thread Raw
In response to +(pg_lsn, int8) and -(pg_lsn, int8) operators  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators
List pgsql-hackers
On Thu, Apr 23, 2020 at 2:51 PM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> Hi,
>
> I'd like to propose to introduce the +(pg_lsn, int8) and -(pg_lsn, int8)
> operators. The + operator allows us to add the number of bytes into pg_lsn,
> resulting new pg_lsn. The - operator allows us to substract the number
> of bytes from pg_lsn, resulting new pg_lsn. Thought?
> I sometimes need these features for debuging purpose.

As it's presented in the patch I don't see much value in calling it as
LSN arithmetic. If we could do something like LSN of Nth WAL record
+/- <number of WAL records, n> = LSN of N+/- n th log record that
would be interesting. :)

-- 
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Poll: are people okay with function/operator table redesign?
Next
From: Tom Lane
Date:
Subject: Re: Poll: are people okay with function/operator table redesign?