From: Justin Pryzby <pryzby@telsasoft.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: PoC/WIP: Extended statistics on expressions (\d in old client)
Date: Wed, 2 Jun 2021 21:39:20 -0500
Message-ID: <20210603023920.GD14099@telsasoft.com> (raw)
In-Reply-To: <04b100f9-201b-0bc8-c613-0f918451b599@enterprisedb.com>
References: <2f2a3b3b-93e4-723f-144e-bc21f10d6b61@enterprisedb.com>
<20210118045331.GF8560@telsasoft.com>
<CAEZATCVnQccV_Z7AuvbvquaOYxUj+cVFk48pPGASYHFjXWgW5g@mail.gmail.com>
<3f20da4d-89dc-0912-98d2-b6f0ef06c87f@enterprisedb.com>
<CAEZATCUuj5FPjtOU2=7Z2pTC8LEvrf79+Go7R8yQ+eE0ezfgfQ@mail.gmail.com>
<f865af90-c19c-769e-8c65-19692e245479@enterprisedb.com>
<20210122022958.GC27167@telsasoft.com>
<acf27932-8159-8872-8fca-902c7a35b351@enterprisedb.com>
<20210122040101.GF27167@telsasoft.com>
<04b100f9-201b-0bc8-c613-0f918451b599@enterprisedb.com>
On Fri, Jan 22, 2021 at 02:09:04PM +0100, Tomas Vondra wrote:
> On 1/22/21 5:01 AM, Justin Pryzby wrote:
> > On Fri, Jan 22, 2021 at 04:49:51AM +0100, Tomas Vondra wrote:
> > > > > | Statistics objects:
> > > > > | "public"."s2" (ndistinct, dependencies, mcv) ON FROM t
> > >
> > > Umm, for me that prints:
> >
> > > "public"."s2" ON ((i + 1)), (((i + 1) + 0)) FROM t
> > >
> > > which I think is OK. But maybe there's something else to trigger the
> > > problem?
> >
> > Oh. It's because I was using /usr/bin/psql and not ./src/bin/psql.
> > I think it's considered ok if old client's \d commands don't work on new
> > server, but it's not clear to me if it's ok if they misbehave. It's almost
> > better it made an ERROR.
> >
>
> Well, how would the server know to throw an error? We can't quite patch the
> old psql (if we could, we could just tweak the query).
To refresh: stats objects on a v14 server which include expressions are shown
by pre-v14 psql client with the expressions elided (because the attnums don't
correspond to anything in pg_attribute).
I'm mentioning it again since, even though I knew about this earlier in the
year, it caused some confusion for me again just now while testing our
application. I had the v14 server installed but the psql symlink still pointed
to the v13 client.
There may not be anything we can do about it.
And it may not be a significant issue outside the beta period: more typically,
the client version would match the server version.
--
Justin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pryzby@telsasoft.com, tomas.vondra@enterprisedb.com, dean.a.rasheed@gmail.com
Subject: Re: PoC/WIP: Extended statistics on expressions (\d in old client)
In-Reply-To: <20210603023920.GD14099@telsasoft.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox