Re: Fix for pageinspect bug in PG 17

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix for pageinspect bug in PG 17
Date: 2024-11-14 00:48:12
Message-ID: ZzVIzNKznkzrdD4k@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 13, 2024 at 09:00:30PM +0100, Tomas Vondra wrote:
> Does that mean you think we should fix the issue at hand differently?
> Say, by looking at number of columns and building the correct tuple,
> like I did in my initial patch?

691e8b2e18 is not something I would have done when it comes to
pageinspect, FWIW. There is the superuser argument for this module,
so I'd vote for an error and apply the same policy across all branches
as a matter of consistency.

A second argument in favor of raising an error is that it makes future
changes a bit easier to implement so as you can reuse the existing
routine as an "internal" workhorse called by the SQL functions
depending on the version of the extension involved at runtime, as we
do in pgss. Data type changes are easier to track, for example. If
you add a solution based on the number of arguments, you may have to
mix it with a per-version approach, at least on HEAD. As long as
there is a test to check on behavior or another, we're going to be
fine because we'll know if a previous assumption suddenly breaks.

Anyway, your solution to use the number of columns to determine what
should be done at runtime works as well, so feel free to just ignore
me. That's just an approach I'd prefer taking here because that's
easier to work with IMO, but I can also see why people don't like the
versioning logic a-la-PGSS, as well.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2024-11-14 00:54:03 Re: Fix for pageinspect bug in PG 17
Previous Message Michael Paquier 2024-11-14 00:35:18 Re: .ready and .done files considered harmful