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
68ea2b7f
Commit
68ea2b7f
authored
Apr 05, 2017
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce lock level for CREATE STATISTICS
In line with other lock reductions related to planning. Simon Riggs
parent
2686ee1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
doc/src/sgml/mvcc.sgml
doc/src/sgml/mvcc.sgml
+2
-1
src/backend/commands/statscmds.c
src/backend/commands/statscmds.c
+7
-1
No files found.
doc/src/sgml/mvcc.sgml
View file @
68ea2b7f
...
...
@@ -923,7 +923,8 @@ ERROR: could not serialize access due to read/write dependencies among transact
<para>
Acquired by <command>VACUUM</command> (without <option>FULL</option>),
<command>ANALYZE</>, <command>CREATE INDEX CONCURRENTLY</>, and
<command>ANALYZE</>, <command>CREATE INDEX CONCURRENTLY</>,
<command>CREATE STATISTICS</> and
<command>ALTER TABLE VALIDATE</command> and other
<command>ALTER TABLE</command> variants (for full details see
<xref linkend="SQL-ALTERTABLE">).
...
...
src/backend/commands/statscmds.c
View file @
68ea2b7f
...
...
@@ -96,7 +96,13 @@ CreateStatistics(CreateStatsStmt *stmt)
errmsg
(
"statistics
\"
%s
\"
already exist"
,
namestr
)));
}
rel
=
heap_openrv
(
stmt
->
relation
,
AccessExclusiveLock
);
/*
* CREATE STATISTICS will influence future execution plans but does
* not interfere with currently executing plans so it is safe to
* take only ShareUpdateExclusiveLock on relation, conflicting with
* ANALYZE and other DDL that sets statistical information.
*/
rel
=
heap_openrv
(
stmt
->
relation
,
ShareUpdateExclusiveLock
);
relid
=
RelationGetRelid
(
rel
);
if
(
rel
->
rd_rel
->
relkind
!=
RELKIND_RELATION
&&
...
...
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