Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)? - Mailing list pgsql-hackers

From David Rowley
Subject Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
Date
Msg-id CAKJS1f-J4NJcUa31Xom-hwigUe=pKeSqnzz3kzz4+V6jpV5kgA@mail.gmail.com
Whole thread Raw
In response to Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?
List pgsql-hackers
On 28 January 2018 at 12:00, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
> On 01/27/2018 10:45 PM, Tom Lane wrote:
>> David Rowley <david.rowley@2ndquadrant.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.

FWIW I'm leaning more towards this being a bug fix too. The only thing
that put doubt in my mind was after digging into the code I realised
that "ALL" means all of TableLikeOption's bits rather than all things
copyable about the table. However, you'd only have to think slightly
beyond that to then think the bug is that the TableLikeOption enum is
just missing an option for including statistics in the first place.

If I'd realised this was missing during my review I'd have pushed back
and said to Tomas that this needs to be added before commit.

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.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: JIT compiling with LLVM v9.1
Next
From: David Rowley
Date:
Subject: Re: STATISTICS retained in CREATE TABLE ... LIKE (INCLUDING ALL)?