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
e587e2e3
Commit
e587e2e3
authored
Mar 06, 2012
by
Heikki Linnakangas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the comments more clear on the fact that UpdateFullPageWrites() is not
safe to call concurrently from multiple processes.
parent
7714c638
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+5
-3
No files found.
src/backend/access/transam/xlog.c
View file @
e587e2e3
...
@@ -8442,6 +8442,9 @@ XLogReportParameters(void)
...
@@ -8442,6 +8442,9 @@ XLogReportParameters(void)
/*
/*
* Update full_page_writes in shared memory, and write an
* Update full_page_writes in shared memory, and write an
* XLOG_FPW_CHANGE record if necessary.
* XLOG_FPW_CHANGE record if necessary.
*
* Note: this function assumes there is no other process running
* concurrently that could update it.
*/
*/
void
void
UpdateFullPageWrites
(
void
)
UpdateFullPageWrites
(
void
)
...
@@ -8452,8 +8455,8 @@ UpdateFullPageWrites(void)
...
@@ -8452,8 +8455,8 @@ UpdateFullPageWrites(void)
* Do nothing if full_page_writes has not been changed.
* Do nothing if full_page_writes has not been changed.
*
*
* It's safe to check the shared full_page_writes without the lock,
* It's safe to check the shared full_page_writes without the lock,
* because we
can guarantee that there is no concurrently running
* because we
assume that there is no concurrently running process
*
process
which can update it.
* which can update it.
*/
*/
if
(
fullPageWrites
==
Insert
->
fullPageWrites
)
if
(
fullPageWrites
==
Insert
->
fullPageWrites
)
return
;
return
;
...
@@ -8490,7 +8493,6 @@ UpdateFullPageWrites(void)
...
@@ -8490,7 +8493,6 @@ UpdateFullPageWrites(void)
XLogInsert
(
RM_XLOG_ID
,
XLOG_FPW_CHANGE
,
&
rdata
);
XLogInsert
(
RM_XLOG_ID
,
XLOG_FPW_CHANGE
,
&
rdata
);
}
}
if
(
!
fullPageWrites
)
if
(
!
fullPageWrites
)
{
{
LWLockAcquire
(
WALInsertLock
,
LW_EXCLUSIVE
);
LWLockAcquire
(
WALInsertLock
,
LW_EXCLUSIVE
);
...
...
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