Обсуждение: pgsql: Revise parse tree representation for VACUUM and ANALYZE.

Поиск
Список
Период
Сортировка

pgsql: Revise parse tree representation for VACUUM and ANALYZE.

От
Robert Haas
Дата:
Revise parse tree representation for VACUUM and ANALYZE.

Like commit f41551f61f9cf4eedd5b7173f985a3bdb4d9858c, this aims
to make it easier to add non-Boolean options to VACUUM (or, in
this case, to ANALYZE).  Instead of building up a bitmap of
options directly in the parser, build up a list of DefElem
objects and let ExecVacuum() sort it out; right now, we make
no use of the fact that a DefElem can carry an associated value,
but it will be easy to make that change in the future.

Masahiko Sawada

Discussion: http://postgr.es/m/CAD21AoATE4sn0jFFH3NcfUZXkU2BMbjBWB_kDj-XWYA-LXDcQA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6776142a07afb4c28961f27059d800196902f5f1

Modified Files
--------------
src/backend/commands/vacuum.c        | 52 ++++++++++++++++----
src/backend/parser/gram.y            | 94 ++++++++++++++++--------------------
src/backend/tcop/utility.c           |  6 +--
src/include/commands/vacuum.h        | 17 ++++++-
src/include/nodes/parsenodes.h       | 26 +++-------
src/test/regress/expected/vacuum.out |  6 ++-
src/test/regress/sql/vacuum.sql      |  1 +
7 files changed, 116 insertions(+), 86 deletions(-)


Re: pgsql: Revise parse tree representation for VACUUM and ANALYZE.

От
Tom Lane
Дата:
Robert Haas <rhaas@postgresql.org> writes:
> Revise parse tree representation for VACUUM and ANALYZE.

The buildfarm's not too happy with this, which I suspect traces
to the fact that you neglected to fix copyfuncs.c and equalfuncs.c.

            regards, tom lane


Re: pgsql: Revise parse tree representation for VACUUM and ANALYZE.

От
Michael Paquier
Дата:
On Mon, Mar 18, 2019 at 09:53:23PM -0400, Tom Lane wrote:
> The buildfarm's not too happy with this, which I suspect traces
> to the fact that you neglected to fix copyfuncs.c and equalfuncs.c.

If you use -DDCOPY_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST, I
am pretty sure that you will be able to reproduce those failures.  See
calliphoridae (still don't know how to pronounce that without
wikipedia-sensei):
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=calliphoridae&dt=2019-03-18%2022%3A19%3A24
--
Michael

Вложения

Re: pgsql: Revise parse tree representation for VACUUM and ANALYZE.

От
Masahiko Sawada
Дата:
On Tue, Mar 19, 2019 at 11:01 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Mon, Mar 18, 2019 at 09:53:23PM -0400, Tom Lane wrote:
> > The buildfarm's not too happy with this, which I suspect traces
> > to the fact that you neglected to fix copyfuncs.c and equalfuncs.c.
>
> If you use -DDCOPY_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST, I
> am pretty sure that you will be able to reproduce those failures.

Thank you for the information. I'll test with that options before
submitting a patch.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


Re: pgsql: Revise parse tree representation for VACUUM and ANALYZE.

От
Tom Lane
Дата:
Masahiko Sawada <sawada.mshk@gmail.com> writes:
> On Tue, Mar 19, 2019 at 11:01 AM Michael Paquier <michael@paquier.xyz> wrote:
>> On Mon, Mar 18, 2019 at 09:53:23PM -0400, Tom Lane wrote:
>>> The buildfarm's not too happy with this, which I suspect traces
>>> to the fact that you neglected to fix copyfuncs.c and equalfuncs.c.

>> If you use -DDCOPY_PARSE_PLAN_TREES -DRAW_EXPRESSION_COVERAGE_TEST, I
>> am pretty sure that you will be able to reproduce those failures.

> Thank you for the information. I'll test with that options before
> submitting a patch.

You shouldn't really have needed the buildfarm to point you to doing
that.  *Any* change to Node structures requires looking into the
backend/node/ files, i.e. copyfuncs.c, equalfuncs.c, outfuncs.c,
readfuncs.c, nodeFuncs.c.  There are some classes of Nodes that
can get away without coverage in one or more of those, but certainly
if you're changing an existing Node struct you should just grep to
see if what you're changing is already mentioned in there.

(I tend to just grep the entire tree, if practical, for references
to a node structure that I'm changing.)

            regards, tom lane


Re: pgsql: Revise parse tree representation for VACUUM and ANALYZE.

От
Alvaro Herrera
Дата:
On 2019-Mar-19, Michael Paquier wrote:

> See calliphoridae (still don't know how to pronounce that without
> wikipedia-sensei):

We already discussed this one, remember?  Anyway, I've avoided Latin
names in further animals to forestall this problem.

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


Re: pgsql: Revise parse tree representation for VACUUM and ANALYZE.

От
Michael Paquier
Дата:
On Tue, Mar 19, 2019 at 11:09:25AM -0300, Alvaro Herrera wrote:
> We already discussed this one, remember?  Anyway, I've avoided Latin
> names in further animals to forestall this problem.

Of course I remember!  Not being able to remember how to spell that is
another problem, and my own issue :)
--
Michael

Вложения