syntax error: VACUUM ANALYZE VERBOSE (PostgreSQL 11 regression)

Started by Pavel Stehuleabout 7 years ago6 messages
#1Pavel Stehule
pavel.stehule@gmail.com

Hi

I have report of one customer. Some scripts stopped on 11 because VACUUM
ANALYZE VERBOSE doesn't work now.

postgres=# vacuum analyze verbose;
ERROR: syntax error at or near "verbose"
LINE 1: vacuum analyze verbose;
^

vacuum verbose analyze is working.

Regards

Pavel

In reply to: Pavel Stehule (#1)
Re: syntax error: VACUUM ANALYZE VERBOSE (PostgreSQL 11 regression)

Hi

At least this is documented behavior:

When the option list is surrounded by parentheses, the options can be written in any order. Without parentheses, options must be specified in exactly the order shown above.

https://www.postgresql.org/docs/current/static/sql-vacuum.html

Previously we have another additional synopsis

VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ table_name [ (column_name [, ...] ) ] ]

Seems this syntax was removed in this commit: /messages/by-id/E1dzW4X-00089L-5a@gemulon.postgresql.org

regards, Sergei

#3Pavel Stehule
pavel.stehule@gmail.com
In reply to: Sergei Kornilov (#2)
Re: syntax error: VACUUM ANALYZE VERBOSE (PostgreSQL 11 regression)

st 31. 10. 2018 v 8:34 odesílatel Sergei Kornilov <sk@zsrv.org> napsal:

Hi

At least this is documented behavior:

When the option list is surrounded by parentheses, the options can be

written in any order. Without parentheses, options must be specified in
exactly the order shown above.
https://www.postgresql.org/docs/current/static/sql-vacuum.html

Previously we have another additional synopsis

VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ table_name [

(column_name [, ...] ) ] ]
Seems this syntax was removed in this commit:
/messages/by-id/E1dzW4X-00089L-5a@gemulon.postgresql.org

ok. Unfortunatelly it is not mentioned in release notes - in not compatible
changes.

This change can hit lot of users. It is small nonsense, but lot of people
use it.

Regards

Pavel

Show quoted text

regards, Sergei

#4Michael Paquier
michael@paquier.xyz
In reply to: Pavel Stehule (#1)
Re: syntax error: VACUUM ANALYZE VERBOSE (PostgreSQL 11 regression)

On Wed, Oct 31, 2018 at 08:19:35AM +0100, Pavel Stehule wrote:

I have report of one customer. Some scripts stopped on 11 because VACUUM
ANALYZE VERBOSE doesn't work now.

postgres=# vacuum analyze verbose;
ERROR: syntax error at or near "verbose"
LINE 1: vacuum analyze verbose;
^
vacuum verbose analyze is working.

Here you go:
commit: 921059bd66c7fb1230c705d3b1a65940800c4cbb
author: Robert Haas <rhaas@postgresql.org>
date: Tue, 9 Jan 2018 10:12:58 -0500
Don't allow VACUUM VERBOSE ANALYZE VERBOSE.

There are plans to extend the syntax for ANALYZE, so we need to break
the link between VacuumStmt and AnalyzeStmt. But apart from that, the
syntax above is undocumented and, if discovered by users, might give
the impression that the VERBOSE option for VACUUM differs from the
verbose option from ANALYZE, which it does not.

Nathan Bossart, reviewed by Michael Paquier and Masahiko Sawada

Discussion: /messages/by-id/D3FC73E2-9B1A-4DB4-8180-55F57D116B4E@amazon.com

You could just use this query for the same result:
vacuum (analyze, verbose);
--
Michael

#5Michael Paquier
michael@paquier.xyz
In reply to: Pavel Stehule (#3)
Re: syntax error: VACUUM ANALYZE VERBOSE (PostgreSQL 11 regression)

On Wed, Oct 31, 2018 at 08:38:27AM +0100, Pavel Stehule wrote:

ok. Unfortunatelly it is not mentioned in release notes - in not compatible
changes.

This change can hit lot of users. It is small nonsense, but lot of people
use it.

Please just look at the order of the words in the command. This is
documented:
VACUUM VERBOSE ANALYZE;
However this version has never been documented, still unfortunately
it was supported:
VACUUM ANALYZE VERBOSE;
--
Michael

#6Pavel Stehule
pavel.stehule@gmail.com
In reply to: Michael Paquier (#5)
Re: syntax error: VACUUM ANALYZE VERBOSE (PostgreSQL 11 regression)

st 31. 10. 2018 v 8:55 odesílatel Michael Paquier <michael@paquier.xyz>
napsal:

On Wed, Oct 31, 2018 at 08:38:27AM +0100, Pavel Stehule wrote:

ok. Unfortunatelly it is not mentioned in release notes - in not

compatible

changes.

This change can hit lot of users. It is small nonsense, but lot of people
use it.

Please just look at the order of the words in the command. This is
documented:
VACUUM VERBOSE ANALYZE;
However this version has never been documented, still unfortunately
it was supported:
VACUUM ANALYZE VERBOSE;

I miss a sentence in release note - like attention on order of keywords in
VACUUM xxx.

Regards

Pavel

--

Show quoted text

Michael