pgsql: Fix parsing of REPACK options

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix parsing of REPACK options
Date: 2026-05-18 04:15:48
Message-ID: E1wOpOO-000686-1J@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix parsing of REPACK options

Previously, REPACK option parsing had two bugs.

First, REPACK (CONCURRENTLY OFF) failed with:

ERROR: unrecognized REPACK option "concurrently"

while CONCURRENTLY ON was accepted correctly.

Second, when the same option was specified multiple times, the last value
specified was not always honored. If any occurrence set the option to ON,
the option was treated as enabled even when the final setting was OFF.

This commit fixes these issues by correctly accepting CONCURRENTLY
regardless of its value, and by making the last specified value take precedence
when an option appears multiple times.

Author: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
Discussion: https://postgr.es/m/CAHGQGwGAY4kfDtC4i+hAOX-a3u0yOA6__6EDTQz-ytsDHgh-yQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a120ecf549853da9fda32e4f80ecd8060531d7b5

Modified Files
--------------
src/backend/commands/repack.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-05-18 04:18:47 pgsql: Fix issues with handling of expressions in extended stats restor
Previous Message Tatsuo Ishii 2026-05-18 03:44:20 pgsql: Fix IGNORE NULLS nullness cache for volatile window arguments.