pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Gould <daveg@sonic.net>
Cc: Alexander Kuzmenkov <a.kuzmenkov@postgrespro.ru>
Cc: pgsql-hackers@lists.postgresql.org, Alina Alexeeva <alexeeva@adobe.com>
Cc: Ullas Lakkur Raghavendra <lakkurra@adobe.com>
Subject: Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.
Date: Tue, 13 Mar 2018 11:20:39 -0400
Message-ID: <997.1520954439@sss.pgh.pa.us> (raw)
In-Reply-To: <20180313001440.581b6662@engels>
References: <20180117164916.3fdcf2e9@engels>
	<fa8122c2-ea7a-ff38-49ac-e6616aec38ea@postgrespro.ru>
	<20180228192337.67cc3f99@engels>
	<4988c54a-1709-a978-9a43-65f8a1e09e94@postgrespro.ru>
	<18522.1519916974@sss.pgh.pa.us>
	<1386effe-0e6d-fd5a-6f0d-f294e4ef2dda@postgrespro.ru>
	<3240.1519948160@sss.pgh.pa.us>
	<20180302161840.3530921f@engels>
	<28773.1520357803@sss.pgh.pa.us>
	<6981.1520871694@sss.pgh.pa.us>
	<20180313001440.581b6662@engels>

David Gould <daveg@sonic.net> writes:
> I also thought about the theory and am confident that there really is no way
> to trick it. Basically if there are enough pages that are different to affect
> the overall density, say 10% empty or so, there is no way a random sample
> larger than a few hundred probes can miss them no matter how big the table is.
> If there are few enough pages to "hide" from the sample, then they are so few
> they don't matter anyway.

> After all this my vote is for back patching too. I don't see any case where
> the patched analyze is or could be worse than what we are doing. I'm happy to
> provide my test cases if anyone is interested.

Yeah, you have a point.  I'm still worried about unexpected side-effects,
but it seems like overall this is very unlikely to hurt anyone.  I'll
back-patch (minus the removal of the unneeded vac_estimate_reltuples
argument).

			regards, tom lane




view thread (33+ messages)  latest in thread

Message-ID: <997.1520954439@sss.pgh.pa.us>
Permalink:  ../997.1520954439@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/997.1520954439@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, daveg@sonic.net, a.kuzmenkov@postgrespro.ru, alexeeva@adobe.com, lakkurra@adobe.com
  Subject: Re: [patch] BUG #15005: ANALYZE can make pg_class.reltuples inaccurate.
  In-Reply-To: <997.1520954439@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