Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: +(pg_lsn, int8) and -(pg_lsn, int8) operators
Date: 2020-04-23 19:21:17
Message-ID: CA+TgmoZ8NTkJP2k4bfVVopvyrRffz43tO7vkpQ9Fhxj9oFDS+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 23, 2020 at 12:28 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
> 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. :)

Well, that would mean that the value of x + 1 would depend not only on
x but on the contents of WAL, and that it would be uncomputable
without having the WAL available, and that adding large values would
be quite expensive.

I much prefer Fujii Masao's proposal.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-04-23 19:27:29 Re: [PATCH] FIx resource leaks (pg_resetwal.c)
Previous Message Ranier Vilela 2020-04-23 18:40:21 Re: [PATCH] FIx resource leaks (pg_resetwal.c)