Re: New EXPLAIN option: ALL

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New EXPLAIN option: ALL
Date: 2019-05-15 15:05:31
Message-ID: 20190515150531.GA12534@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-May-13, David Fetter wrote:

> I tried changing it to EXEC (EXPLAIN EXECUTE is already a thing), but
> got a giant flock of reduce-reduce conflicts along with a few
> shift-reduce conflicts.

After eyeballing the giant patch set you sent[1], I think EXEC is a
horrible keyword to use -- IMO it should either be the complete word
EXECUTE, or we should pick some other word. I realize that we do not
want to have different sets of keywords when using the legacy syntax (no
parens) vs. new-style (with parens), but maybe we should just not
support the EXECUTE keyword in the legacy syntax; there's already a
number of options we don't support in the legacy syntax (BUFFERS,
TIMING), so this isn't much of a stretch.

IOW if we want to change ANALYZE to EXECUTE, I propose we change it in
the new-style syntax only and not the legacy one. So:

EXPLAIN ANALYZE SELECT ... -- legacy syntax
EXPLAIN (EXECUTE) SELECT ... -- new-style
EXPLAIN (ANALYZE) SELECT ... -- we still support ANALYZE as an alias, for compatibility

this should not cause a conflict with EXPLAIN EXECUTE, so these all
should work:

EXPLAIN ANALYZE EXECUTE ...
EXPLAIN (EXECUTE) EXECUTE ...
EXPLAIN (ANALYZE) EXECUTE ...

[1] I think if you just leave out the GUC print from the changes, it
becomes a reasonable patch series.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-05-15 15:53:13 Re: pgsql: Compute XID horizon for page level index vacuum on primary.
Previous Message Tom Lane 2019-05-15 14:46:39 Re: New EXPLAIN option: ALL