Re: list of extended statistics on psql

From: Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: list of extended statistics on psql
Date: 2020-11-10 03:38:53
Message-ID: 3f695394-9c0a-51d3-9bd7-c25ad2217cca@nttcom.co.jp_1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Tomas,

> I took a look at this today, and I think the code is ready, but the
> regression test needs a bit more work:

Thanks for taking your time. :-D

> 1) It's probably better to use somewhat more specific names for the
> objects, especially when created in public schema. It decreases the
> chance of a collision with other tests (which may be hard to notice
> because of timing). I suggest we use "stts_" prefix or something like
> that, per the attached 0002 patch. (0001 is just the v7 patch)

I agree with your comment. Thanks.

> 2) The test is failing intermittently because it's executed in parallel
> with stats_ext test, which is also creating extended statistics. So
> depending on the timing the \dX may list some of the stats_ext stuff.
> I'm not sure what to do about this. Either this part needs to be moved
> to a separate test executed in a different group, or maybe we should
> simply move it to stats_ext.

I thought all tests related to meta-commands exist in psql.sql, but I
realize it's not true. For example, the test of \dRp does not exist in
psql.sql. Therefore, I moved the regression test of \dX to stats_ext.sql
to avoid the test failed in parallel.

Attached patches is following:
- 0001-v8-Add-dX-command-on-psql.patch
- 0002-Add-regression-test-of-dX-to-stats_ext.sql.patch

However, I feel the test of \dX is not elegant, so I'm going to try
creating another one since it would be better to be aware of the context
of existing extended stats tests.

Regards,
Tatsuro Yamada

Attachment Content-Type Size
0002-Add-regression-test-of-dX-to-stats_ext.sql.patch text/plain 9.3 KB
0001-v8-Add-dX-command-on-psql.patch text/plain 7.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-11-10 04:13:43 Re: upcoming API changes for LLVM 12
Previous Message Michael Paquier 2020-11-10 03:34:45 Re: warn_unused_results