Re: ALTER TABLE ... SET DATA TYPE removes statistics

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Euler Taveira <euler(at)eulerto(dot)com>
Cc: "nikolai(dot)berkoff" <nikolai(dot)berkoff(at)pm(dot)me>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: ALTER TABLE ... SET DATA TYPE removes statistics
Date: 2021-10-19 03:52:45
Message-ID: YW5BDcUqz8kucDPr@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Oct 18, 2021 at 05:15:59PM -0300, Euler Taveira wrote:
> I agree that it might surprise an user and it would be good to document it.
> However, it does not belong to the description. I would add it to the Notes
> section at the end of the ALTER TABLE page.

No objections to the suggested addition and the location of the
addition (paragraph of SET DATA TYPE rather than "Notes"), but I think
that the phrasing could be better:
"The column's statistics are removed, hence a follow-up ANALYZE is
suited to update the statistics to the new column type."
--
Michael

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2021-10-19 08:59:08 max_sync_workers_per_subscription
Previous Message Euler Taveira 2021-10-19 00:02:08 Re: vacuumdb --analyze-in-stages