On Wed, Oct 28, 2020 at 12:05 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
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.
The definition of auto-analyze is just fine; the issue is with the user unfriendly position that the only times analyze is ever run is when it is run manually or heuristically in a separate process. I agree that this isn't a bug in the traditional sense - the current behavior is intentional - but it is a POLA violation.
The fundamental question here is do we want to change our policy in this regard and make our system more user-friendly? If so, let's do so for v14 in honor of the problem the lack of documentation and POLA violation has recently caused.
Then, as a separate concern, should we admit the oversight and back-patch our policy change or just move forward and add documentation to older versions?
As a close analogy, we don't make any effort to force an immediate auto-analyze after CREATE STATISTICS.