]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix parsing of REPACK options
authorFujii Masao <fujii@postgresql.org>
Mon, 18 May 2026 04:14:49 +0000 (13:14 +0900)
committerFujii Masao <fujii@postgresql.org>
Mon, 18 May 2026 04:14:49 +0000 (13:14 +0900)
commita120ecf549853da9fda32e4f80ecd8060531d7b5
tree6778d0c2ad8991f7f3d2c97254dca32a9a933da9
parent26269fe3c83beed1601e3bd156a98cf7696e9e08
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.fujii@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/CAHGQGwGAY4kfDtC4i+hAOX-a3u0yOA6__6EDTQz-ytsDHgh-yQ@mail.gmail.com
src/backend/commands/repack.c