PostgreSQL Source Code
git master
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
lockdefs.h
Go to the documentation of this file.
1
/*-------------------------------------------------------------------------
2
*
3
* lockdefs.h
4
* Frontend exposed parts of postgres' low level lock mechanism
5
*
6
* The split between lockdefs.h and lock.h is not very principled. This file
7
* contains definition that have to (indirectly) be available when included by
8
* FRONTEND code.
9
*
10
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
11
* Portions Copyright (c) 1994, Regents of the University of California
12
*
13
* src/include/storage/lockdefs.h
14
*
15
*-------------------------------------------------------------------------
16
*/
17
#ifndef LOCKDEFS_H_
18
#define LOCKDEFS_H_
19
20
/*
21
* LOCKMODE is an integer (1..N) indicating a lock type. LOCKMASK is a bit
22
* mask indicating a set of held or requested lock types (the bit 1<<mode
23
* corresponds to a particular lock mode).
24
*/
25
typedef
int
LOCKMASK
;
26
typedef
int
LOCKMODE
;
27
28
/*
29
* These are the valid values of type LOCKMODE for all the standard lock
30
* methods (both DEFAULT and USER).
31
*/
32
33
/* NoLock is not a lock mode, but a flag value meaning "don't get a lock" */
34
#define NoLock 0
35
36
#define AccessShareLock 1
/* SELECT */
37
#define RowShareLock 2
/* SELECT FOR UPDATE/FOR SHARE */
38
#define RowExclusiveLock 3
/* INSERT, UPDATE, DELETE */
39
#define ShareUpdateExclusiveLock 4
/* VACUUM (non-FULL),ANALYZE, CREATE
40
* INDEX CONCURRENTLY */
41
#define ShareLock 5
/* CREATE INDEX (WITHOUT CONCURRENTLY) */
42
#define ShareRowExclusiveLock 6
/* like EXCLUSIVE MODE, but allows ROW
43
* SHARE */
44
#define ExclusiveLock 7
/* blocks ROW SHARE/SELECT...FOR
45
* UPDATE */
46
#define AccessExclusiveLock 8
/* ALTER TABLE, DROP TABLE, VACUUM
47
* FULL, and unqualified LOCK TABLE */
48
49
typedef
struct
xl_standby_lock
50
{
51
TransactionId
xid
;
/* xid of holder of AccessExclusiveLock */
52
Oid
dbOid
;
53
Oid
relOid
;
54
}
xl_standby_lock
;
55
56
#endif
/* LOCKDEF_H_ */
xl_standby_lock::relOid
Oid relOid
Definition:
lockdefs.h:53
TransactionId
uint32 TransactionId
Definition:
c.h:393
LOCKMODE
int LOCKMODE
Definition:
lockdefs.h:26
Oid
unsigned int Oid
Definition:
postgres_ext.h:31
xl_standby_lock
struct xl_standby_lock xl_standby_lock
xl_standby_lock::dbOid
Oid dbOid
Definition:
lockdefs.h:52
xl_standby_lock::xid
TransactionId xid
Definition:
lockdefs.h:51
LOCKMASK
int LOCKMASK
Definition:
lockdefs.h:25
xl_standby_lock
Definition:
lockdefs.h:49
src
include
storage
lockdefs.h
Generated on Sat Jun 4 2016 10:15:40 for PostgreSQL Source Code by
1.8.8