pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: Fabrízio Mello <fabriziomello@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add important info about ANALYZE after create Functional Index
Date: Wed, 28 Oct 2020 15:05:39 -0400
Message-ID: <1442677.1603911939@sss.pgh.pa.us> (raw)
In-Reply-To: <20201028185538.fzux2lhim472h46o@development>
References: <CAFcNs+qpFPmiHd1oTXvcPdvAHicJDA9qBUSujgAhUMJyUMb+SA@mail.gmail.com>
	<CAKFQuwb9GFe4oM3k9bsn7GOk5_jfow-9SpWocAG4xAYVp9nLjg@mail.gmail.com>
	<20201028185538.fzux2lhim472h46o@development>

Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> On Mon, Oct 26, 2020 at 03:46:10PM -0700, David G. Johnston wrote:
>> It would seem preferable to call the lack of auto-analyzing after these
>> operations a bug and back-patch a fix that injects an analyze side-effect
>> just before their completion.  It doesn't have to be smart either,
>> analyzing things even if the created (or newly validated) index doesn't
>> have statistics of its own isn't a problem in my book.

> I agree the lack of stats may be quite annoying and cause issues, but my
> guess is the chances of backpatching such change are about 0.000001%. We
> have a usable 'workaround' for this - manual analyze.

This doesn't seem clearly different from any other situation where
auto-analyze doesn't react fast enough to suit you.  I would not
call it a bug, at least not without a wholesale redefinition of
how auto-analyze is supposed to work.  As a close analogy, we
don't make any effort to force an immediate auto-analyze after
CREATE STATISTICS.

I don't see anything in the CREATE STATISTICS man page pointing
that out, either.  But there's probably room for "Notes" entries
about it in both places.

			regards, tom lane





view thread (40+ messages)  latest in thread

Message-ID: <1442677.1603911939@sss.pgh.pa.us>
Permalink:  ../1442677.1603911939@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1442677.1603911939@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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tomas.vondra@2ndquadrant.com, david.g.johnston@gmail.com, fabriziomello@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Add important info about ANALYZE after create Functional Index
  In-Reply-To: <1442677.1603911939@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