postgresql/src/backend
Tom Lane 3505862a8d Further repair of eqjoinsel ndistinct-clamping logic.
Examination of examples provided by Mark Kirkwood and others has convinced
me that actually commit 7f3eba30c9 was quite
a few bricks shy of a load.  The useful part of that patch was clamping
ndistinct for the inner side of a semi or anti join, and the reason why
that's needed is that it's the only way that restriction clauses
eliminating rows from the inner relation can affect the estimated size of
the join result.  I had not clearly understood why the clamping was
appropriate, and so mis-extrapolated to conclude that we should clamp
ndistinct for the outer side too, as well as for both sides of regular
joins.  These latter actions were all wrong, and are reverted with this
patch.  In addition, the clamping logic is now made to affect the behavior
of both paths in eqjoinsel_semi, with or without MCV lists to compare.
When we have MCVs, we suppose that the most common values are the ones
that are most likely to survive the decimation resulting from a lower
restriction clause, so we think of the clamping as eliminating non-MCV
values, or potentially even the least-common MCVs for the inner relation.

Back-patch to 8.4, same as previous fixes in this area.
2011-09-01 00:20:05 -04:00
..
access Preserve toast value OIDs in toast-swap-by-content for CLUSTER/VACUUM FULL. 2011-08-16 13:48:16 -04:00
bootstrap Avoid changing an index's indcheckxmin horizon during REINDEX. 2011-04-19 18:51:03 -04:00
catalog Fix aboriginal copy-paste mistake in error message 2011-06-13 17:54:36 -04:00
commands Fix a missed case in code for "moving average" estimate of reltuples. 2011-08-30 14:49:57 -04:00
executor Fix trigger WHEN conditions when both BEFORE and AFTER triggers exist. 2011-08-21 18:16:08 -04:00
foreign Wrap calls to SearchSysCache and related functions using macros. 2010-02-14 18:42:19 +00:00
lib pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
libpq Use OpenSSL's SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag. 2011-07-24 15:18:02 -04:00
main Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
nodes Fix performance problem when building a lossy tidbitmap. 2011-08-20 14:51:32 -04:00
optimizer Fix nested PlaceHolderVar expressions that appear only in targetlists. 2011-08-09 00:49:04 -04:00
parser Expose the "*VALUES*" alias that we generate for a stand-alone VALUES list. 2011-06-04 15:48:25 -04:00
po Fixed string in German translation that causes segfault. 2011-06-20 13:56:11 +02:00
port Modernize dlopen interface code for FreeBSD and OpenBSD. 2011-04-07 15:14:44 -04:00
postmaster Fix VACUUM so that it always updates pg_class.reltuples/relpages. 2011-05-30 17:07:07 -04:00
regex pgindent run for 9.0 2010-02-26 02:01:40 +00:00
replication Before exiting walreceiver, fsync() all the WAL received. 2011-01-17 12:29:15 +02:00
rewrite pgindent run for 9.0 2010-02-26 02:01:40 +00:00
snowball Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:06 +02:00
storage Move CheckRecoveryConflictDeadlock() call to a safer place. 2011-08-02 15:16:44 -04:00
tcop On IA64 architecture, we check the depth of the register stack in addition 2011-04-13 11:52:54 +03:00
tsearch Fix tsmatchsel() to account properly for null rows. 2011-02-17 19:00:54 -05:00
utils Further repair of eqjoinsel ndistinct-clamping logic. 2011-09-01 00:20:05 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:06 +02:00
common.mk Expand test coverage support to entire tree 2009-08-07 20:50:22 +00:00
Makefile Split the LDFLAGS make variable into two parts: LDFLAGS is now used for 2010-07-05 18:54:38 +00:00
nls.mk Translation updates for release 9.0.2 2010-12-13 23:20:00 +02:00