pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Rework the pg_statistic_ext catalog
Date: Sat, 15 Jun 2019 22:05:44 -0400
Message-ID: <20156.1560650744@sss.pgh.pa.us> (raw)
In-Reply-To: <8833.1560647898@sss.pgh.pa.us>
References: <E1hcHz2-0005mY-5A@gemulon.postgresql.org>
	<8833.1560647898@sss.pgh.pa.us>

I wrote:
> Tomas Vondra <tomas.vondra@postgresql.org> writes:
>> Rework the pg_statistic_ext catalog

> So ... not one of the buildfarm members that are running TAP tests
> likes this. ...
> I think probably what's happening is that pg_dump is still trying to dump
> directly from the catalog, when what it needs to do now is dump from the
> view, in case it's not running as superuser.

I experimented with extracting the required data from the view, and
there are at least two show-stopper problems:

* The view doesn't expose pg_statistic_ext.oid, which pg_dump has to have
for dependency tracking purposes.  I think we could just add it though.
Now that OIDs are ordinary columns it won't even look very odd.

* Rather than just not exposing the critical data for stats you don't
have privilege to read, the view doesn't expose anything at all.
I do not think that's acceptable; it creates a significant hazard of
data loss during pg_dump, for no very good reason.  What we should
be doing, IMO, is still showing all the rows but filling the data-value
columns with nulls in rows where the caller can't access the underlying
data.

			regards, tom lane





view thread (13+ messages)  latest in thread

Message-ID: <20156.1560650744@sss.pgh.pa.us>
Permalink:  ../20156.1560650744@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20156.1560650744@sss.pgh.pa.us

 · 

reply

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tomas.vondra@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Rework the pg_statistic_ext catalog
  In-Reply-To: <20156.1560650744@sss.pgh.pa.us>

* 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