From: Andres Freund <andres@anarazel.de>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Victor Yegorov <vyegorov@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16285: bt_metap fails with value is out of range for type integer
Date: Mon, 9 Mar 2020 15:35:57 -0700
Message-ID: <20200309223557.aip5n6ewln4ixbbi@alap3.anarazel.de> (raw)
In-Reply-To: <CAH2-WznSzcbS68Q0B07NRKiPQT8vyrD6wPLq35b4WuiWq1AKHA@mail.gmail.com>
References: <16285-df8fc1000ab3d5fc@postgresql.org>
<20200303013936.GA27326@alvherre.pgsql>
<CAGnEbogyKh_UN1n_fGvmb_O5AWHdHvHipmktfvBFzRKw66z33w@mail.gmail.com>
<CAH2-Wzm1he651X9NKiBtuBa5D7i7dw0zfY9X699+3OKpnW4=ug@mail.gmail.com>
<CAH2-Wz=esJqUO_QTasnjGPHvER7Bo5iac04UgUqR7V7N-YPMDg@mail.gmail.com>
<20200309220930.ozdulsvymhfgm4dq@alap3.anarazel.de>
<CAH2-WznSzcbS68Q0B07NRKiPQT8vyrD6wPLq35b4WuiWq1AKHA@mail.gmail.com>
Hi,
On 2020-03-09 15:31:38 -0700, Peter Geoghegan wrote:
> On Mon, Mar 9, 2020 at 3:09 PM Andres Freund <andres@anarazel.de> wrote:
> > ISTM that we need some fix for the back-branches too. Being unable to
> > look at some indexes till 12 has aged out doesn't strike me as good.
>
> Actually, the oldest_xact field was added in Postgres 11.
What do you mean? Since 12 is the newest release affected, we'd
potentially (and with increasing likelihood due to clusters living
longer) have the problem till 12 is not supported anymore. What am I
missing?
> > How about simply printing the wrapped value? That's far from perfect, of
> > course, but clearly better than the current situation in the back
> > branches.
>
> Would you be happy if we always raised a NOTICE that had information
> about the affected fields? I don't think that we should try to be
> clever and only do it when we know that it will fail. We should admit
> that it's broken with a HINT that gets associated with the NOTICE, in
> order to discourage relying on the number within automated tools.
I'd just do the s/%u/%d/.
> If we were to do this, it would probably only be necessary to
> backpatch to Postgres 11 and 12. Those are the only stable releases
> with the oldest_xact field. In practice, it is highly likely to be the
> thing that causes problems. We will report the root block number at a
> negative block number when it happens to exceed 2^31-1, but that
> condition is almost impossible to hit in practice, even when the index
> size is close to the system-wide limit of relation size. That's why
> nobody has complained about it in all these years.
pg_class.relpages is also reported as a signed integer :(. Since
btm_root/fastroot use %d, it'll just have similar wrapping behaviour.
Greetings,
Andres Freund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: andres@anarazel.de, pg@bowt.ie, vyegorov@gmail.com, alvherre@2ndquadrant.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16285: bt_metap fails with value is out of range for type integer
In-Reply-To: <20200309223557.aip5n6ewln4ixbbi@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox