~ubuntu-branches/ubuntu/lucid/postgresql-8.4/lucid-proposed

« back to all changes in this revision

Viewing changes to src/include/storage/fsm_internals.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8
8
 * Portions Copyright (c) 1994, Regents of the University of California
9
9
 *
10
 
 * $PostgreSQL: pgsql/src/include/storage/fsm_internals.h,v 1.2 2009/01/01 17:24:01 momjian Exp $
 
10
 * $PostgreSQL: pgsql/src/include/storage/fsm_internals.h,v 1.3 2009/06/11 14:49:12 momjian Exp $
11
11
 *
12
12
 *-------------------------------------------------------------------------
13
13
 */
25
25
typedef struct
26
26
{
27
27
        /*
28
 
         * fsm_search_avail() tries to spread the load of multiple backends
29
 
         * by returning different pages to different backends in a round-robin
30
 
         * fashion. fp_next_slot points to the next slot to be returned
31
 
         * (assuming there's enough space on it for the request). It's defined
32
 
         * as an int, because it's updated without an exclusive lock. uint16
33
 
         * would be more appropriate, but int is more likely to be atomically
 
28
         * fsm_search_avail() tries to spread the load of multiple backends by
 
29
         * returning different pages to different backends in a round-robin
 
30
         * fashion. fp_next_slot points to the next slot to be returned (assuming
 
31
         * there's enough space on it for the request). It's defined as an int,
 
32
         * because it's updated without an exclusive lock. uint16 would be more
 
33
         * appropriate, but int is more likely to be atomically
34
34
         * fetchable/storable.
35
35
         */
36
 
        int fp_next_slot;
 
36
        int                     fp_next_slot;
37
37
 
38
38
        /*
39
39
         * fp_nodes contains the binary tree, stored in array. The first
40
40
         * NonLeafNodesPerPage elements are upper nodes, and the following
41
41
         * LeafNodesPerPage elements are leaf nodes. Unused nodes are zero.
42
42
         */
43
 
        uint8   fp_nodes[1];
 
43
        uint8           fp_nodes[1];
44
44
} FSMPageData;
45
45
 
46
46
typedef FSMPageData *FSMPage;
63
63
 
64
64
/* Prototypes for functions in fsmpage.c */
65
65
extern int fsm_search_avail(Buffer buf, uint8 min_cat, bool advancenext,
66
 
                                                        bool exclusive_lock_held);
 
66
                                 bool exclusive_lock_held);
67
67
extern uint8 fsm_get_avail(Page page, int slot);
68
68
extern uint8 fsm_get_max_avail(Page page);
69
69
extern bool fsm_set_avail(Page page, int slot, uint8 value);