Re: Print pg_lsn as a number?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Scott Stroupe <sstroupe(at)kofile(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Print pg_lsn as a number?
Date: 2018-06-13 00:39:22
Message-ID: 20180613003922.wofpblpdkg3jchhw@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On 2018-06-13 09:18:21 +0900, Michael Paquier wrote:
> We map pg_wal_lsn_diff result to a numeric, so that could make sense to
> use numeric as well here, which is not the greatest choice by the way as
> that's an int64 internally, but that's more portable for any
> (unlikely-to-happen) future changes.

The reason to not use int64 is that it's signed. lsns are
unsigned. Therefore you couldn't represent all LSNs without wrapping
into negative.

Greetings,

Andres Freund

In response to

Browse pgsql-general by date

  From Date Subject
Next Message a 2018-06-13 01:20:49 Re: Does pgAgent support chinese, japanese characters?
Previous Message Michael Paquier 2018-06-13 00:18:21 Re: Print pg_lsn as a number?