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
52f1b2f3
Commit
52f1b2f3
authored
Apr 30, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent priority inversion in locking by checking for existing locks
before going into queue behind person with higher piority.
parent
7d62e9c7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
34 deletions
+34
-34
HISTORY
HISTORY
+7
-0
doc/src/sgml/install.sgml
doc/src/sgml/install.sgml
+11
-21
src/Makefile.shlib
src/Makefile.shlib
+4
-4
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/lock.c
+9
-5
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/proc.c
+3
-4
No files found.
HISTORY
View file @
52f1b2f3
PostgreSQL 6.5 Fri Apr 23 17:40:19 EDT 1999
=========================================================
A dump/restore is required.
PLACE HOLDER
PostgreSQL 6.4.2 Sat Jan 2 11:04:05 EST 1999
PostgreSQL 6.4.2 Sat Jan 2 11:04:05 EST 1999
=========================================================
=========================================================
...
...
doc/src/sgml/install.sgml
View file @
52f1b2f3
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<Abstract>
<Abstract>
<Para>
<Para>
Complete installation instructions for
Complete installation instructions for
<ProductName>Postgres</ProductName> v6.
4
.
<ProductName>Postgres</ProductName> v6.
5
.
</Para>
</Para>
</Abstract>
</Abstract>
...
@@ -167,8 +167,8 @@ remaining steps in the installation will happen in this account.
...
@@ -167,8 +167,8 @@ remaining steps in the installation will happen in this account.
<Step Performance="required">
<Step Performance="required">
<Para>
<Para>
Ftp file
Ftp file
<ulink url="ftp://ftp.postgresql.org/pub/postgresql-v6.
4
.tar.gz">
<ulink url="ftp://ftp.postgresql.org/pub/postgresql-v6.
5
.tar.gz">
<filename>ftp://ftp.postgresql.org/pub/postgresql-v6.
4
.tar.gz</filename></ulink>
<filename>ftp://ftp.postgresql.org/pub/postgresql-v6.
5
.tar.gz</filename></ulink>
from the Internet. Store it in your home directory.
from the Internet. Store it in your home directory.
</Para>
</Para>
</Step>
</Step>
...
@@ -268,7 +268,7 @@ from the new distribution:
...
@@ -268,7 +268,7 @@ from the new distribution:
<ProgramListing>
<ProgramListing>
$ cd
$ cd
$ gunzip -c postgresql-v6.
4
.tar.gz \
$ gunzip -c postgresql-v6.
5
.tar.gz \
| tar xvf - src/bin/pg_dump/pg_dumpall
| tar xvf - src/bin/pg_dump/pg_dumpall
$ chmod a+x src/bin/pg_dump/pg_dumpall
$ chmod a+x src/bin/pg_dump/pg_dumpall
$ src/bin/pg_dump/pg_dumpall -z > db.out
$ src/bin/pg_dump/pg_dumpall -z > db.out
...
@@ -411,7 +411,7 @@ $ exit
...
@@ -411,7 +411,7 @@ $ exit
Unzip and untar the new source file. Type
Unzip and untar the new source file. Type
<ProgramListing>
<ProgramListing>
$ cd /usr/src/pgsql
$ cd /usr/src/pgsql
$ gunzip -c ~/postgresql-v6.
4
.tar.gz | tar xvf -
$ gunzip -c ~/postgresql-v6.
5
.tar.gz | tar xvf -
</ProgramListing>
</ProgramListing>
</Para>
</Para>
</Step>
</Step>
...
@@ -989,17 +989,7 @@ For example,
...
@@ -989,17 +989,7 @@ For example,
<listitem>
<listitem>
<Para>
<Para>
For a i686/Linux-ELF platform, no tests failed since this is the
For a i686/Linux-ELF platform, no tests failed since this is the
v6.4 regression testing reference platform.
v6.5 regression testing reference platform.
</Para>
</listitem>
<listitem>
<Para>
For the SPARC/Linux-ELF platform, using the 970525 beta version of
<ProductName>Postgres</ProductName> v6.2 the following tests "failed":
float8 and geometry "failed" due to minor precision differences in
floating point numbers. select_views produces massively different output,
but the differences are due to minor floating point differences.
</Para>
</Para>
</listitem>
</listitem>
...
@@ -1109,11 +1099,11 @@ VACUUM;
...
@@ -1109,11 +1099,11 @@ VACUUM;
<Para>
<Para>
Clean up after yourself. Type
Clean up after yourself. Type
<ProgramListing>
<ProgramListing>
$ rm -rf /usr/src/pgsql_6_
0
$ rm -rf /usr/src/pgsql_6_
5
$ rm -rf /usr/local/pgsql_6_
0
$ rm -rf /usr/local/pgsql_6_
5
# Also delete old database directory tree if it is not in
# Also delete old database directory tree if it is not in
# /usr/local/pgsql_6_
0
/data
# /usr/local/pgsql_6_
5
/data
$ rm ~/postgresql-v6.
2.1
.tar.gz
$ rm ~/postgresql-v6.
5
.tar.gz
</ProgramListing>
</ProgramListing>
</Para>
</Para>
</Step>
</Step>
...
@@ -1160,7 +1150,7 @@ $ lpr -l -s -r manpage.hp
...
@@ -1160,7 +1150,7 @@ $ lpr -l -s -r manpage.hp
<itemizedlist>
<itemizedlist>
<listitem>
<listitem>
<para>
<para>
The version of <ProductName>Postgres</ProductName> (v6.
4, 6.3
.2, beta 981014, etc.).
The version of <ProductName>Postgres</ProductName> (v6.
5, 6.4
.2, beta 981014, etc.).
</para>
</para>
</listitem>
</listitem>
...
...
src/Makefile.shlib
View file @
52f1b2f3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
# Copyright (c) 1998, Regents of the University of California
# Copyright (c) 1998, Regents of the University of California
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.
7 1999/03/14 16:02:57
momjian Exp $
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.
8 1999/04/30 02:04:49
momjian Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -86,14 +86,14 @@ ifeq ($(PORTNAME), bsdi)
...
@@ -86,14 +86,14 @@ ifeq ($(PORTNAME), bsdi)
ifdef
BSD_SHLIB
ifdef
BSD_SHLIB
ifeq
($(DLSUFFIX), .so)
ifeq
($(DLSUFFIX), .so)
install-shlib-dep
:=
install-shlib
install-shlib-dep
:=
install-shlib
shlib
:=
lib
$(NAME)$(DLSUFFIX)
.
$(SO_MAJOR_VERSION)
.
$(SO_MINOR_VERSION)
shlib
:=
lib
$(NAME)$(DLSUFFIX)
.
$(SO_MAJOR_VERSION)
.
$(SO_MINOR_VERSION)
LDFLAGS_SL
+=
-shared
LDFLAGS_SL
+=
-shared
CFLAGS
+=
$(CFLAGS_SL)
CFLAGS
+=
$(CFLAGS_SL)
endif
endif
ifeq
($(DLSUFFIX), .o)
ifeq
($(DLSUFFIX), .o)
install-shlib-dep
:=
install-shlib
install-shlib-dep
:=
install-shlib
shlib
:=
lib
$(NAME)$(DLSUFFIX)
.
$(SO_MAJOR_VERSION)
.
$(SO_MINOR_VERSION)
shlib
:=
lib
$(NAME)$(DLSUFFIX)
.
$(SO_MAJOR_VERSION)
.
$(SO_MINOR_VERSION)
LD
:=
shlicc
LD
:=
shlicc
LDFLAGS_SL
+=
-O
-r
LDFLAGS_SL
+=
-O
-r
CFLAGS
+=
$(CFLAGS_SL)
CFLAGS
+=
$(CFLAGS_SL)
endif
endif
...
...
src/backend/storage/lmgr/lock.c
View file @
52f1b2f3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.4
6 1999/03/06 21:17:44 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.4
7 1999/04/30 02:04:50 momjian
Exp $
*
*
* NOTES
* NOTES
* Outside modules can create a lock table and acquire/release
* Outside modules can create a lock table and acquire/release
...
@@ -820,13 +820,17 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
...
@@ -820,13 +820,17 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
/* ------------------------
/* ------------------------
* If someone with a greater priority is waiting for the lock,
* If someone with a greater priority is waiting for the lock,
* do not continue and share the lock, even if we can. bjm
* do not continue and share the lock, even if we can. bjm
* Don't do this if the process already has some locks, because
* this could hold up other people waiting on our locks, causing
* a priority inversion. bjm
* ------------------------
* ------------------------
*/
*/
int
myprio
=
LockMethodTable
[
lockmethod
]
->
ctl
->
prio
[
lockmode
];
int
myprio
=
LockMethodTable
[
lockmethod
]
->
ctl
->
prio
[
lockmode
];
PROC_QUEUE
*
waitQueue
=
&
(
lock
->
waitProcs
);
PROC_QUEUE
*
waitQueue
=
&
(
lock
->
waitProcs
);
PROC
*
topproc
=
(
PROC
*
)
MAKE_PTR
(
waitQueue
->
links
.
prev
);
PROC
*
topproc
=
(
PROC
*
)
MAKE_PTR
(
waitQueue
->
links
.
prev
);
if
(
waitQueue
->
size
&&
topproc
->
prio
>
myprio
)
if
(
SHMQueueEmpty
(
lockQueue
)
&&
waitQueue
->
size
&&
topproc
->
prio
>
myprio
)
{
{
XID_PRINT
(
"LockResolveConflicts: higher priority proc waiting"
,
XID_PRINT
(
"LockResolveConflicts: higher priority proc waiting"
,
result
);
result
);
...
@@ -1595,7 +1599,7 @@ DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock, bool skip_check)
...
@@ -1595,7 +1599,7 @@ DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock, bool skip_check)
*
*
* The lock we are waiting for is already in MyProc->lockQueue so we
* The lock we are waiting for is already in MyProc->lockQueue so we
* need to skip it here. We are trying to find it in someone
* need to skip it here. We are trying to find it in someone
* else's lockQueue.
* else's lockQueue.
bjm
*/
*/
if
(
lock
==
findlock
&&
!
skip_check
)
if
(
lock
==
findlock
&&
!
skip_check
)
return
true
;
return
true
;
...
@@ -1625,7 +1629,7 @@ DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock, bool skip_check)
...
@@ -1625,7 +1629,7 @@ DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock, bool skip_check)
*
*
* Basically, the test is, "Do we both hold some lock on
* Basically, the test is, "Do we both hold some lock on
* findlock, and we are both waiting in the lock
* findlock, and we are both waiting in the lock
* queue?"
* queue?"
bjm
*/
*/
Assert
(
skip_check
);
Assert
(
skip_check
);
...
@@ -1672,7 +1676,7 @@ DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock, bool skip_check)
...
@@ -1672,7 +1676,7 @@ DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock, bool skip_check)
* hold locks and are waiting. Now we check for
* hold locks and are waiting. Now we check for
* cases where we have two or more tables in a
* cases where we have two or more tables in a
* deadlock. We do this by continuing to search
* deadlock. We do this by continuing to search
* for someone holding a lock
* for someone holding a lock
bjm
*/
*/
if
(
DeadLockCheck
(
&
(
proc
->
lockQueue
),
findlock
,
false
))
if
(
DeadLockCheck
(
&
(
proc
->
lockQueue
),
findlock
,
false
))
return
true
;
return
true
;
...
...
src/backend/storage/lmgr/proc.c
View file @
52f1b2f3
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.5
2 1999/03/28 20:32:26 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.5
3 1999/04/30 02:04:51 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
* This is so that we can support more backends. (system-wide semaphore
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
* sets run out pretty fast.) -ay 4/95
*
*
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.5
2 1999/03/28 20:32:26 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.5
3 1999/04/30 02:04:51 momjian
Exp $
*/
*/
#include <sys/time.h>
#include <sys/time.h>
#include <unistd.h>
#include <unistd.h>
...
@@ -516,8 +516,7 @@ ProcSleep(PROC_QUEUE *waitQueue,/* lock->waitProcs */
...
@@ -516,8 +516,7 @@ ProcSleep(PROC_QUEUE *waitQueue,/* lock->waitProcs */
* In a full queue, we would have a reader holding a lock, then a writer
* In a full queue, we would have a reader holding a lock, then a writer
* gets the lock, then a bunch of readers, made up of readers who
* gets the lock, then a bunch of readers, made up of readers who
* could not share the first readlock because a writer was waiting,
* could not share the first readlock because a writer was waiting,
* and new readers arriving while the writer had the lock.
* and new readers arriving while the writer had the lock. bjm
*
*/
*/
proc
=
(
PROC
*
)
MAKE_PTR
(
waitQueue
->
links
.
prev
);
proc
=
(
PROC
*
)
MAKE_PTR
(
waitQueue
->
links
.
prev
);
...
...
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