Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ae6a6585
Commit
ae6a6585
authored
Jun 26, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename LockTab to LockTable in function name.
parent
eef15f55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+13
-13
src/backend/storage/lmgr/multi.c
src/backend/storage/lmgr/multi.c
+3
-3
src/include/storage/lock.h
src/include/storage/lock.h
+2
-2
No files found.
src/backend/storage/lmgr/lock.c
View file @
ae6a6585
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.2
7 1998/06/15 19:29:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.2
8 1998/06/26 01:58:45
momjian Exp $
*
*
* NOTES
* NOTES
* Outside modules can create a lock table and acquire/release
* Outside modules can create a lock table and acquire/release
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
*
*
* Interface:
* Interface:
*
*
* LockAcquire(), LockRelease(), LockTabInit().
* LockAcquire(), LockRelease(), LockTab
le
Init().
*
*
* LockReplace() is called only within this module and by the
* LockReplace() is called only within this module and by the
* lkchain module. It releases a lock without looking
* lkchain module. It releases a lock without looking
...
@@ -213,7 +213,7 @@ LockTypeInit(LOCKTAB *ltable,
...
@@ -213,7 +213,7 @@ LockTypeInit(LOCKTAB *ltable,
}
}
/*
/*
* LockTabInit -- initialize a lock table structure
* LockTab
le
Init -- initialize a lock table structure
*
*
* Notes:
* Notes:
* (a) a lock table has four separate entries in the binding
* (a) a lock table has four separate entries in the binding
...
@@ -223,7 +223,7 @@ LockTypeInit(LOCKTAB *ltable,
...
@@ -223,7 +223,7 @@ LockTypeInit(LOCKTAB *ltable,
*
*
*/
*/
LockTableId
LockTableId
LockTabInit
(
char
*
tabName
,
LockTab
le
Init
(
char
*
tabName
,
MASK
*
conflictsP
,
MASK
*
conflictsP
,
int
*
prioP
,
int
*
prioP
,
int
ntypes
)
int
ntypes
)
...
@@ -237,7 +237,7 @@ LockTabInit(char *tabName,
...
@@ -237,7 +237,7 @@ LockTabInit(char *tabName,
if
(
ntypes
>
MAX_LOCKTYPES
)
if
(
ntypes
>
MAX_LOCKTYPES
)
{
{
elog
(
NOTICE
,
"LockTabInit: too many lock types %d greater than %d"
,
elog
(
NOTICE
,
"LockTab
le
Init: too many lock types %d greater than %d"
,
ntypes
,
MAX_LOCKTYPES
);
ntypes
,
MAX_LOCKTYPES
);
return
(
INVALID_TABLEID
);
return
(
INVALID_TABLEID
);
}
}
...
@@ -245,7 +245,7 @@ LockTabInit(char *tabName,
...
@@ -245,7 +245,7 @@ LockTabInit(char *tabName,
if
(
NumTables
>
MAX_TABLES
)
if
(
NumTables
>
MAX_TABLES
)
{
{
elog
(
NOTICE
,
elog
(
NOTICE
,
"LockTabInit: system limit of MAX_TABLES (%d) lock tables"
,
"LockTab
le
Init: system limit of MAX_TABLES (%d) lock tables"
,
MAX_TABLES
);
MAX_TABLES
);
return
(
INVALID_TABLEID
);
return
(
INVALID_TABLEID
);
}
}
...
@@ -254,7 +254,7 @@ LockTabInit(char *tabName,
...
@@ -254,7 +254,7 @@ LockTabInit(char *tabName,
shmemName
=
(
char
*
)
palloc
((
unsigned
)
(
strlen
(
tabName
)
+
32
));
shmemName
=
(
char
*
)
palloc
((
unsigned
)
(
strlen
(
tabName
)
+
32
));
if
(
!
shmemName
)
if
(
!
shmemName
)
{
{
elog
(
NOTICE
,
"LockTabInit: couldn't malloc string %s
\n
"
,
tabName
);
elog
(
NOTICE
,
"LockTab
le
Init: couldn't malloc string %s
\n
"
,
tabName
);
return
(
INVALID_TABLEID
);
return
(
INVALID_TABLEID
);
}
}
...
@@ -262,7 +262,7 @@ LockTabInit(char *tabName,
...
@@ -262,7 +262,7 @@ LockTabInit(char *tabName,
ltable
=
(
LOCKTAB
*
)
palloc
((
unsigned
)
sizeof
(
LOCKTAB
));
ltable
=
(
LOCKTAB
*
)
palloc
((
unsigned
)
sizeof
(
LOCKTAB
));
if
(
!
ltable
)
if
(
!
ltable
)
{
{
elog
(
NOTICE
,
"LockTabInit: couldn't malloc lock table %s
\n
"
,
tabName
);
elog
(
NOTICE
,
"LockTab
le
Init: couldn't malloc lock table %s
\n
"
,
tabName
);
pfree
(
shmemName
);
pfree
(
shmemName
);
return
(
INVALID_TABLEID
);
return
(
INVALID_TABLEID
);
}
}
...
@@ -285,7 +285,7 @@ LockTabInit(char *tabName,
...
@@ -285,7 +285,7 @@ LockTabInit(char *tabName,
if
(
!
ltable
->
ctl
)
if
(
!
ltable
->
ctl
)
{
{
elog
(
FATAL
,
"LockTabInit: couldn't initialize %s"
,
tabName
);
elog
(
FATAL
,
"LockTab
le
Init: couldn't initialize %s"
,
tabName
);
status
=
FALSE
;
status
=
FALSE
;
}
}
...
@@ -326,7 +326,7 @@ LockTabInit(char *tabName,
...
@@ -326,7 +326,7 @@ LockTabInit(char *tabName,
Assert
(
ltable
->
lockHash
->
hash
==
tag_hash
);
Assert
(
ltable
->
lockHash
->
hash
==
tag_hash
);
if
(
!
ltable
->
lockHash
)
if
(
!
ltable
->
lockHash
)
{
{
elog
(
FATAL
,
"LockTabInit: couldn't initialize %s"
,
tabName
);
elog
(
FATAL
,
"LockTab
le
Init: couldn't initialize %s"
,
tabName
);
status
=
FALSE
;
status
=
FALSE
;
}
}
...
@@ -347,7 +347,7 @@ LockTabInit(char *tabName,
...
@@ -347,7 +347,7 @@ LockTabInit(char *tabName,
if
(
!
ltable
->
xidHash
)
if
(
!
ltable
->
xidHash
)
{
{
elog
(
FATAL
,
"LockTabInit: couldn't initialize %s"
,
tabName
);
elog
(
FATAL
,
"LockTab
le
Init: couldn't initialize %s"
,
tabName
);
status
=
FALSE
;
status
=
FALSE
;
}
}
...
@@ -365,7 +365,7 @@ LockTabInit(char *tabName,
...
@@ -365,7 +365,7 @@ LockTabInit(char *tabName,
}
}
/*
/*
* LockTabRename -- allocate another tableId to the same
* LockTab
le
Rename -- allocate another tableId to the same
* lock table.
* lock table.
*
*
* NOTES: Both the lock module and the lock chain (lchain.c)
* NOTES: Both the lock module and the lock chain (lchain.c)
...
@@ -378,7 +378,7 @@ LockTabInit(char *tabName,
...
@@ -378,7 +378,7 @@ LockTabInit(char *tabName,
*/
*/
#ifdef NOT_USED
#ifdef NOT_USED
LockTableId
LockTableId
LockTabRename
(
LockTableId
tableId
)
LockTab
le
Rename
(
LockTableId
tableId
)
{
{
LockTableId
newTableId
;
LockTableId
newTableId
;
...
...
src/backend/storage/lmgr/multi.c
View file @
ae6a6585
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.1
4 1998/06/23 17:59:54
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.1
5 1998/06/26 01:58:45
momjian Exp $
*
*
* NOTES:
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
* (1) The lock.c module assumes that the caller here is doing
...
@@ -96,14 +96,14 @@ InitMultiLevelLockm()
...
@@ -96,14 +96,14 @@ InitMultiLevelLockm()
if
(
MultiTableId
)
if
(
MultiTableId
)
return
MultiTableId
;
return
MultiTableId
;
tableId
=
LockTabInit
(
"LockTable"
,
MultiConflicts
,
MultiPrios
,
5
);
tableId
=
LockTab
le
Init
(
"LockTable"
,
MultiConflicts
,
MultiPrios
,
5
);
MultiTableId
=
tableId
;
MultiTableId
=
tableId
;
if
(
!
(
MultiTableId
))
if
(
!
(
MultiTableId
))
elog
(
ERROR
,
"InitMultiLockm: couldnt initialize lock table"
);
elog
(
ERROR
,
"InitMultiLockm: couldnt initialize lock table"
);
/* -----------------------
/* -----------------------
* No short term lock table for now. -Jeff 15 July 1991
* No short term lock table for now. -Jeff 15 July 1991
*
*
* ShortTermTableId = LockTabRename(tableId);
* ShortTermTableId = LockTab
le
Rename(tableId);
* if (! (ShortTermTableId)) {
* if (! (ShortTermTableId)) {
* elog(ERROR,"InitMultiLockm: couldnt rename lock table");
* elog(ERROR,"InitMultiLockm: couldnt rename lock table");
* }
* }
...
...
src/include/storage/lock.h
View file @
ae6a6585
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
*
*
* Copyright (c) 1994, Regents of the University of California
* Copyright (c) 1994, Regents of the University of California
*
*
* $Id: lock.h,v 1.1
2 1998/06/15 18:40:03
momjian Exp $
* $Id: lock.h,v 1.1
3 1998/06/26 01:58:46
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -207,7 +207,7 @@ extern SPINLOCK LockMgrLock;
...
@@ -207,7 +207,7 @@ extern SPINLOCK LockMgrLock;
extern
void
InitLocks
(
void
);
extern
void
InitLocks
(
void
);
extern
void
LockDisable
(
int
status
);
extern
void
LockDisable
(
int
status
);
extern
LockTableId
extern
LockTableId
LockTabInit
(
char
*
tabName
,
MASK
*
conflictsP
,
int
*
prioP
,
LockTab
le
Init
(
char
*
tabName
,
MASK
*
conflictsP
,
int
*
prioP
,
int
ntypes
);
int
ntypes
);
extern
bool
LockAcquire
(
LockTableId
tableId
,
LOCKTAG
*
lockName
,
LOCKT
lockt
);
extern
bool
LockAcquire
(
LockTableId
tableId
,
LOCKTAG
*
lockName
,
LOCKT
lockt
);
extern
int
extern
int
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment