Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tels <nospam-pg-abuse(at)bloodgate(dot)com>, Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Subject: Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Date: 2018-01-30 01:14:54
Message-ID: CAKFQuwYYEz7cwqLhevRLyaGSwNkARqJ9x+r+VyQ81Gite0pnHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice

On Mon, Jan 29, 2018 at 2:55 AM, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
wrote:

> On 28 January 2018 at 12:00, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
> wrote:
> > On 01/27/2018 10:45 PM, Tom Lane wrote:
> >> David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> writes:
> >>> I'd offer to put it back to the order of the enum, but I want to
> >>> minimise the invasiveness of the patch. I'm not sure yet if it should
> >>> be classed as a bug fix or a new feature.
> >>
> >> FWIW, I'd call it a new feature.
> >>
> >
> > I'm not sure what exactly the feature would be? I mean "keep statistics
> > even if you only ask for indexes" does not seem particularly helpful to
> > me. So I see it more like a bug - I certainly think it should have been
> > handled differently in 10.
>
> Now I'll ask; On me doing so, would anyone have pushed back on that
> request and said that what I'm asking is a separate feature?
>
> If the answer to that is "no", then this is a bug that should be fixed
> and backpacked to v10.

​Its a bug of omission (I'm going with no one saying no to your
proposition) - though that still doesn't automatically allow us to
back-patch it.

This bug has an obvious if annoying work-around and fixing the bug will
likely cause people's code, that uses said work-around, to fail. Breaking
people's working code in stable release branches is generally a no-no.

However, given that this was discovered 4 months after the feature was
released suggests to me that we are justified, and community-serving, to
back-patch this. Put more bluntly, we can ask for more leeway in the first
few patch releases of a new feature since more people will benefit from 5
years of a fully-baked feature than may be harmed by said change. We
shouldn't abuse that but an obvious new feature bug/oversight like this
seems reasonable.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2018-01-30 01:44:16 Re: PATCH: Exclude unlogged tables from base backups
Previous Message Masahiko Sawada 2018-01-30 01:10:13 Re: PATCH: Exclude unlogged tables from base backups

Browse pgsql-novice by date

  From Date Subject
Next Message Not A Scientist 2018-01-31 08:47:37 Upgrade 8.4.22 to 9.2 - LC_Collate differs
Previous Message David G. Johnston 2018-01-29 13:56:50 Re: syntax error on Function return setoff