]> granicus.if.org Git - postgresql/blob - src/include/storage/procarray.h
d1780bcca185e13ee205990ee8e3450928e621a8
[postgresql] / src / include / storage / procarray.h
1 /*-------------------------------------------------------------------------
2  *
3  * procarray.h
4  *        POSTGRES process array definitions.
5  *
6  *
7  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8  * Portions Copyright (c) 1994, Regents of the University of California
9  *
10  * $PostgreSQL: pgsql/src/include/storage/procarray.h,v 1.2 2005/06/17 22:32:50 tgl Exp $
11  *
12  *-------------------------------------------------------------------------
13  */
14 #ifndef PROCARRAY_H
15 #define PROCARRAY_H
16
17 #include "storage/lock.h"
18
19
20 extern int      ProcArrayShmemSize(void);
21 extern void CreateSharedProcArray(void);
22 extern void ProcArrayAdd(PGPROC *proc);
23 extern void ProcArrayRemove(PGPROC *proc);
24
25 extern bool TransactionIdIsInProgress(TransactionId xid);
26 extern bool TransactionIdIsActive(TransactionId xid);
27 extern TransactionId GetOldestXmin(bool allDbs);
28
29 extern PGPROC *BackendPidGetProc(int pid);
30 extern bool IsBackendPid(int pid);
31 extern bool DatabaseHasActiveBackends(Oid databaseId, bool ignoreMyself);
32
33 extern int      CountActiveBackends(void);
34
35 extern void XidCacheRemoveRunningXids(TransactionId xid,
36                                                   int nxids, TransactionId *xids);
37
38 #endif   /* PROCARRAY_H */