Re: BUG #16285: bt_metap fails with value is out of range for type integer

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Victor Yegorov <vyegorov(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16285: bt_metap fails with value is out of range for type integer
Date: 2020-03-09 22:31:38
Message-ID: CAH2-WznSzcbS68Q0B07NRKiPQT8vyrD6wPLq35b4WuiWq1AKHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Mar 9, 2020 at 3:09 PM Andres Freund <andres(at)anarazel(dot)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.

> 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.

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.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2020-03-09 22:35:57 Re: BUG #16285: bt_metap fails with value is out of range for type integer
Previous Message Jack Tseng 2020-03-09 22:25:03 Re: select big table postgresql crash