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 <[email protected]>
Reviewed-by: Álvaro Herrera <[email protected]>
Discussion: 
https://postgr.es/m/cahgqgwgay4kfdtc4i+haox-a3u0yoa6__6edtqz-ytsdhgh...@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(-)

Reply via email to