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
e6e9e18e
Commit
e6e9e18e
authored
Dec 20, 2000
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove multi.c and single.c, which have been dead code for
over two years.
parent
39b547f4
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
539 deletions
+0
-539
src/backend/storage/lmgr/multi.c
src/backend/storage/lmgr/multi.c
+0
-453
src/backend/storage/lmgr/single.c
src/backend/storage/lmgr/single.c
+0
-86
No files found.
src/backend/storage/lmgr/multi.c
deleted
100644 → 0
View file @
39b547f4
This diff is collapsed.
Click to expand it.
src/backend/storage/lmgr/single.c
deleted
100644 → 0
View file @
39b547f4
/*-------------------------------------------------------------------------
*
* single.c
* set single locks in the multi-level lock hierarchy
*
* Sometimes we don't want to set all levels of the multi-level
* lock hierarchy at once. This allows us to set and release
* one level at a time. It's useful in index scans when
* you can set an intent lock at the beginning and thereafter
* only set page locks. Tends to speed things up.
*
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/single.c,v 1.13 2000/01/26 05:57:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#include "storage/lmgr.h"
#include "storage/lock.h"
#include "storage/multilev.h"
#include "utils/rel.h"
/*
* SingleLockReln -- lock a relation
*
* Returns: TRUE if the lock can be set, FALSE otherwise.
*/
bool
SingleLockReln
(
LockInfo
lockinfo
,
LOCKMODE
lockmode
,
int
action
)
{
LOCKTAG
tag
;
/*
* LOCKTAG has two bytes of padding, unfortunately. The hash function
* will return miss if the padding bytes aren't zero'd.
*/
MemSet
(
&
tag
,
0
,
sizeof
(
tag
));
tag
.
relId
=
lockinfo
->
lockRelId
.
relId
;
tag
.
dbId
=
lockinfo
->
lockRelId
.
dbId
;
BlockIdSet
(
&
(
tag
.
tupleId
.
ip_blkid
),
InvalidBlockNumber
);
tag
.
tupleId
.
ip_posid
=
InvalidOffsetNumber
;
if
(
action
==
UNLOCK
)
return
LockRelease
(
MultiTableId
,
&
tag
,
lockmode
);
else
return
LockAcquire
(
MultiTableId
,
&
tag
,
lockmode
);
}
/*
* SingleLockPage -- use multi-level lock table, but lock
* only at the page level.
*
* Assumes that an INTENT lock has already been set in the
* multi-level lock table.
*
*/
bool
SingleLockPage
(
LockInfo
lockinfo
,
ItemPointer
tidPtr
,
LOCKMODE
lockmode
,
int
action
)
{
LOCKTAG
tag
;
/*
* LOCKTAG has two bytes of padding, unfortunately. The hash function
* will return miss if the padding bytes aren't zero'd.
*/
MemSet
(
&
tag
,
0
,
sizeof
(
tag
));
tag
.
relId
=
lockinfo
->
lockRelId
.
relId
;
tag
.
dbId
=
lockinfo
->
lockRelId
.
dbId
;
BlockIdCopy
(
&
(
tag
.
tupleId
.
ip_blkid
),
&
(
tidPtr
->
ip_blkid
));
tag
.
tupleId
.
ip_posid
=
InvalidOffsetNumber
;
if
(
action
==
UNLOCK
)
return
LockRelease
(
MultiTableId
,
&
tag
,
lockmode
);
else
return
LockAcquire
(
MultiTableId
,
&
tag
,
lockmode
);
}
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