~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to src/backend/access/gin/ginvacuum.c

Tags: upstream-8.4.0
ImportĀ upstreamĀ versionĀ 8.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 * Portions Copyright (c) 1994, Regents of the University of California
9
9
 *
10
10
 * IDENTIFICATION
11
 
 *                      $PostgreSQL: pgsql/src/backend/access/gin/ginvacuum.c,v 1.28 2009/03/24 20:17:11 tgl Exp $
 
11
 *                      $PostgreSQL: pgsql/src/backend/access/gin/ginvacuum.c,v 1.30 2009/06/11 14:48:53 momjian Exp $
12
12
 *-------------------------------------------------------------------------
13
13
 */
14
14
 
533
533
 
534
534
                        if (GinGetNPosting(itup) != newN)
535
535
                        {
536
 
                                Datum                   value;
537
 
                                OffsetNumber    attnum;
 
536
                                Datum           value;
 
537
                                OffsetNumber attnum;
538
538
 
539
539
                                /*
540
540
                                 * Some ItemPointers was deleted, so we should remake our
724
724
                PG_RETURN_POINTER(stats);
725
725
        }
726
726
 
727
 
        /* 
728
 
         * Set up all-zero stats and cleanup pending inserts
729
 
         * if ginbulkdelete wasn't called
 
727
        /*
 
728
         * Set up all-zero stats and cleanup pending inserts if ginbulkdelete
 
729
         * wasn't called
730
730
         */
731
731
        if (stats == NULL)
732
732
        {
741
741
         * tell how many distinct heap entries are referenced by a GIN index.
742
742
         */
743
743
        stats->num_index_tuples = info->num_heap_tuples;
 
744
        stats->estimated_count = info->estimated_count;
744
745
 
745
746
        /*
746
747
         * If vacuum full, we already have exclusive lock on the index. Otherwise,
757
758
        if (needLock)
758
759
                UnlockRelationForExtension(index, ExclusiveLock);
759
760
 
760
 
        totFreePages =  0;
 
761
        totFreePages = 0;
761
762
 
762
763
        for (blkno = GIN_ROOT_BLKNO + 1; blkno < npages; blkno++)
763
764
        {