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

« back to all changes in this revision

Viewing changes to src/backend/access/index/indexam.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:
81
81
 *
82
82
 * Note: the ReindexIsProcessingIndex() check in RELATION_CHECKS is there
83
83
 * to check that we don't try to scan or do retail insertions into an index
84
 
 * that is currently being rebuilt or pending rebuild.  This helps to catch
 
84
 * that is currently being rebuilt or pending rebuild.  This helps to catch
85
85
 * things that don't work when reindexing system catalogs.  The assertion
86
86
 * doesn't prevent the actual rebuild because we don't use RELATION_CHECKS
87
87
 * when calling the index AM's ambuild routine, and there is no reason for
146
146
 *              index_open - open an index relation by relation OID
147
147
 *
148
148
 *              If lockmode is not "NoLock", the specified kind of lock is
149
 
 *              obtained on the index.  (Generally, NoLock should only be
 
149
 *              obtained on the index.  (Generally, NoLock should only be
150
150
 *              used if the caller knows it has some appropriate lock on the
151
151
 *              index already.)
152
152
 *
411
411
 * returnable tuple in each HOT chain, and so restoring the prior state at the
412
412
 * granularity of the index AM is sufficient.  Since the only current user
413
413
 * of mark/restore functionality is nodeMergejoin.c, this effectively means
414
 
 * that merge-join plans only work for MVCC snapshots.  This could be fixed
 
414
 * that merge-join plans only work for MVCC snapshots.  This could be fixed
415
415
 * if necessary, but for now it seems unimportant.
416
416
 * ----------------
417
417
 */
551
551
        /*
552
552
         * If we scanned a whole HOT chain and found only dead tuples, tell index
553
553
         * AM to kill its entry for that TID (this will take effect in the next
554
 
         * amgettuple call, in index_getnext_tid).      We do not do this when in
 
554
         * amgettuple call, in index_getnext_tid).  We do not do this when in
555
555
         * recovery because it may violate MVCC to do so.  See comments in
556
556
         * RelationGetIndexScan().
557
557
         */
588
588
                {
589
589
                        /*
590
590
                         * We are resuming scan of a HOT chain after having returned an
591
 
                         * earlier member.      Must still hold pin on current heap page.
 
591
                         * earlier member.  Must still hold pin on current heap page.
592
592
                         */
593
593
                        Assert(BufferIsValid(scan->xs_cbuf));
594
594
                        Assert(ItemPointerGetBlockNumber(&scan->xs_ctup.t_self) ==
758
758
 *              particular indexed attribute are those with both types equal to
759
759
 *              the index opclass' opcintype (note that this is subtly different
760
760
 *              from the indexed attribute's own type: it may be a binary-compatible
761
 
 *              type instead).  Only the default functions are stored in relcache
 
761
 *              type instead).  Only the default functions are stored in relcache
762
762
 *              entries --- access methods can use the syscache to look up non-default
763
763
 *              functions.
764
764
 *
792
792
 *              index_getprocinfo
793
793
 *
794
794
 *              This routine allows index AMs to keep fmgr lookup info for
795
 
 *              support procs in the relcache.  As above, only the "default"
 
795
 *              support procs in the relcache.  As above, only the "default"
796
796
 *              functions for any particular indexed attribute are cached.
797
797
 *
798
798
 * Note: the return value points into cached data that will be lost during