pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix argument handling in pg_indexam_progress_phasename()
Date: Thu, 22 Oct 2026 05:39:51 +0000
Message-ID: <E1xJlWp-00000000Hpr-19gk@gemulon.postgresql.org> (raw)

Fix argument handling in pg_indexam_progress_phasename()

The function is declared in pg_proc.dat a bigint as its second input
argument, but the function's code used PG_GETARG_INT32().

This is an issue in 32-bit architectures in stable branches (up to v18)
where bigint is still passed by reference, reporting bogus numbers.
Since 2a600a93c7b (v19 and HEAD), this is less of a problem as Datums
became 8-byte wide everywhere.

Oversight in ab0dfc961b6.

Author: Markos Fountoulakis <markos@planetscale.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/e791bbb7-af3a-4a91-a5bb-c744e5c3ef54@planetscale.com
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/58998c33d19932670a2191a569fe9fa2e16db1d6

Modified Files
--------------
src/backend/utils/adt/amutils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1xJlWp-00000000Hpr-19gk@gemulon.postgresql.org>
Permalink:  ../E1xJlWp-00000000Hpr-19gk@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xJlWp-00000000Hpr-19gk@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Fix argument handling in pg_indexam_progress_phasename()
  In-Reply-To: <E1xJlWp-00000000Hpr-19gk@gemulon.postgresql.org>
  References: <E1xJlWp-00000000Hpr-19gk@gemulon.postgresql.org>

* 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