~ubuntu-branches/ubuntu/trusty/postgresql-9.3/trusty-proposed

« back to all changes in this revision

Viewing changes to src/backend/optimizer/path/joinrels.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-07-24 16:13:59 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140724161359-uk325qfv03euxuuh
Tags: 9.3.5-0ubuntu0.14.04.1
* New upstream bug fix release: (LP: #1348176)
  - pg_upgrade: Users who upgraded to version 9.3 using pg_upgrade may have
    an issue with transaction information which causes VACUUM to eventually
    fail. These users should run the script provided in the release notes to
    determine if their installation is affected, and then take the remedy
    steps outlined there.
  - Various data integrity and other bug fixes.
  - Secure Unix-domain sockets of temporary postmasters started during make
    check.
    Any local user able to access the socket file could connect as the
    server's bootstrap superuser, then proceed to execute arbitrary code as
    the operating-system user running the test, as we previously noted in
    CVE-2014-0067. This change defends against that risk by placing the
    server's socket in a temporary, mode 0700 subdirectory of /tmp.
  - See release notes for details:
    http://www.postgresql.org/about/news/1534/
* Remove pg_regress patches to support --host=/path, obsolete with above
  upstream changes and not applicable any more.
* Drop tcl8.6 patch, applied upstream.
* Add missing logrotate test dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
 
214
214
                /*----------
215
215
                 * When special joins are involved, there may be no legal way
216
 
                 * to make an N-way join for some values of N.  For example consider
 
216
                 * to make an N-way join for some values of N.  For example consider
217
217
                 *
218
218
                 * SELECT ... FROM t1 WHERE
219
219
                 *       x IN (SELECT ... FROM t2,t3 WHERE ...) AND
337
337
        ListCell   *l;
338
338
 
339
339
        /*
340
 
         * Ensure output params are set on failure return.      This is just to
 
340
         * Ensure output params are set on failure return.  This is just to
341
341
         * suppress uninitialized-variable warnings from overly anal compilers.
342
342
         */
343
343
        *sjinfo_p = NULL;
345
345
 
346
346
        /*
347
347
         * If we have any special joins, the proposed join might be illegal; and
348
 
         * in any case we have to determine its join type.      Scan the join info
 
348
         * in any case we have to determine its join type.  Scan the join info
349
349
         * list for conflicts.
350
350
         */
351
351
        match_sjinfo = NULL;
609
609
 
610
610
        /*
611
611
         * If it's a plain inner join, then we won't have found anything in
612
 
         * join_info_list.      Make up a SpecialJoinInfo so that selectivity
 
612
         * join_info_list.  Make up a SpecialJoinInfo so that selectivity
613
613
         * estimation functions will know what's being joined.
614
614
         */
615
615
        if (sjinfo == NULL)
916
916
 *
917
917
 * Essentially, this tests whether have_join_order_restriction() could
918
918
 * succeed with this rel and some other one.  It's OK if we sometimes
919
 
 * say "true" incorrectly.      (Therefore, we don't bother with the relatively
 
919
 * say "true" incorrectly.  (Therefore, we don't bother with the relatively
920
920
 * expensive has_legal_joinclause test.)
921
921
 */
922
922
static bool
1027
1027
 * dummy.
1028
1028
 *
1029
1029
 * Also, when called during GEQO join planning, we are in a short-lived
1030
 
 * memory context.      We must make sure that the dummy path attached to a
 
1030
 * memory context.  We must make sure that the dummy path attached to a
1031
1031
 * baserel survives the GEQO cycle, else the baserel is trashed for future
1032
1032
 * GEQO cycles.  On the other hand, when we are marking a joinrel during GEQO,
1033
1033
 * we don't want the dummy path to clutter the main planning context.  Upshot