Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit68c0425

Browse files
ildusAlexander Korotkov
authored and
Alexander Korotkov
committed
Fix allocation for locks
1 parent01537b4 commit68c0425

File tree

1 file changed

+17
-15
lines changed
  • src/backend/storage/lmgr

1 file changed

+17
-15
lines changed

‎src/backend/storage/lmgr/lock.c

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,6 @@ intmax_locks_per_xact; /* set by guc.c */
5757
#defineNLOCKENTS() \
5858
mul_size(max_locks_per_xact, add_size(MaxBackends, max_prepared_xacts))
5959

60-
/* Lock names. For monitoring purposes */
61-
constchar*LOCK_NAMES[]=
62-
{
63-
"Relation",
64-
"RelationExtend",
65-
"Page",
66-
"Tuple",
67-
"Transaction",
68-
"VirtualTransaction",
69-
"SpeculativeToken",
70-
"Object",
71-
"Userlock",
72-
"Advisory"
73-
};
74-
7560
/*
7661
* Data structures defining the semantics of the standard lock methods.
7762
*
@@ -119,6 +104,20 @@ static const LOCKMASK LockConflicts[] = {
119104

120105
};
121106

107+
/* Lock names. For monitoring purposes */
108+
constchar*LOCK_NAMES[]=
109+
{
110+
"Relation",
111+
"RelationExtend",
112+
"Page",
113+
"Tuple",
114+
"Transaction",
115+
"VirtualTransaction",
116+
"Object",
117+
"Userlock",
118+
"Advisory"
119+
};
120+
122121
/* Names of lock modes, for debug printouts */
123122
staticconstchar*constlock_mode_names[]=
124123
{
@@ -3314,6 +3313,9 @@ LockShmemSize(void)
33143313
max_table_size *=2;
33153314
size=add_size(size,hash_estimate_size(max_table_size,sizeof(PROCLOCK)));
33163315

3316+
/* Lock Manager LWLock structures */
3317+
size=add_size(size,LWLockTrancheShmemSize(NUM_LOCK_PARTITIONS));
3318+
33173319
/*
33183320
* Since NLOCKENTS is only an estimate, add 10% safety margin.
33193321
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp