Re: Print pg_lsn as a number? - Mailing list pgsql-general

From Andres Freund
Subject Re: Print pg_lsn as a number?
Date
Msg-id 20180613003922.wofpblpdkg3jchhw@alap3.anarazel.de
Whole thread Raw
In response to Re: Print pg_lsn as a number?  (Michael Paquier <michael@paquier.xyz>)
List 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


pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Print pg_lsn as a number?
Next
From: "a"
Date:
Subject: Re: Does pgAgent support chinese, japanese characters?