Improve ereports for VACUUM's BUFFER_USAGE_LIMIT option
authorDavid Rowley <[email protected]>
Tue, 11 Apr 2023 07:36:34 +0000 (19:36 +1200)
committerDavid Rowley <[email protected]>
Tue, 11 Apr 2023 07:36:34 +0000 (19:36 +1200)
commit68a2a437f46716efd54d177edf9dbcc9916c903b
tree6bba2a5b264216f0efa912af8edf61b6d1e63a31
parentd866f0374ca688937b905fbebfcc2c5f8dc88b54
Improve ereports for VACUUM's BUFFER_USAGE_LIMIT option

There's no need to check if opt->arg is NULL since defGetString() already
does that and raises an ERROR if it is.  Let's just remove that check.

Also, combine the two remaining ERRORs into a single check.  It seems
better to give an indication about what sort of values we're looking for
rather than just to state that the value given isn't valid.  Make
BUFFER_USAGE_LIMIT uppercase in this ERROR message too.  It's already
upper case in one other error message, so make that consistent.

Reported-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/20230411.102335.1643720544536884844[email protected]
src/backend/commands/vacuum.c
src/test/regress/expected/vacuum.out