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
ba1868ba
Commit
ba1868ba
authored
Jan 30, 2012
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor bug fix and cleanup from self-review of sync rep queues patch.
parent
73f617f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
src/backend/postmaster/checkpointer.c
src/backend/postmaster/checkpointer.c
+1
-1
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+3
-3
src/backend/replication/syncrep.c
src/backend/replication/syncrep.c
+4
-6
No files found.
src/backend/postmaster/checkpointer.c
View file @
ba1868ba
...
...
@@ -673,7 +673,7 @@ CheckpointWriteDelay(int flags, double progress)
got_SIGHUP
=
false
;
ProcessConfigFile
(
PGC_SIGHUP
);
/* update global shmem state for sync rep */
SyncRepUpdateSyncStandbysDefined
();
UpdateSharedMemoryConfig
();
}
AbsorbFsyncRequests
();
...
...
src/backend/postmaster/postmaster.c
View file @
ba1868ba
...
...
@@ -4212,13 +4212,13 @@ sigusr1_handler(SIGNAL_ARGS)
FatalError
=
false
;
/*
* Crank up the background writer. It doesn't matter if this fails,
* Crank up the background writer
s
. It doesn't matter if this fails,
* we'll just try again later.
*/
Assert
(
BgWriterPID
==
0
);
BgWriterPID
=
StartBackgroundWriter
();
Assert
(
CheckpointerPID
==
0
);
CheckpointerPID
=
StartCheckpointer
();
Assert
(
BgWriterPID
==
0
);
BgWriterPID
=
StartBackgroundWriter
();
pmState
=
PM_RECOVERY
;
}
...
...
src/backend/replication/syncrep.c
View file @
ba1868ba
...
...
@@ -62,9 +62,6 @@ char *SyncRepStandbyNames;
#define SyncStandbysDefined() \
(SyncRepStandbyNames != NULL && SyncRepStandbyNames[0] != '\0')
#define SyncRepRequested() \
(max_wal_senders > 0 && synchronous_commit > SYNCHRONOUS_COMMIT_LOCAL_FLUSH)
static
bool
announce_next_takeover
=
true
;
static
int
SyncRepWaitMode
=
SYNC_REP_NO_WAIT
;
...
...
@@ -98,6 +95,7 @@ SyncRepWaitForLSN(XLogRecPtr XactCommitLSN)
{
char
*
new_status
=
NULL
;
const
char
*
old_status
;
int
mode
=
SyncRepWaitMode
;
/*
* Fast exit if user has not requested sync replication, or there are no
...
...
@@ -122,7 +120,7 @@ SyncRepWaitForLSN(XLogRecPtr XactCommitLSN)
* be a low cost check.
*/
if
(
!
WalSndCtl
->
sync_standbys_defined
||
XLByteLE
(
XactCommitLSN
,
WalSndCtl
->
lsn
[
SyncRepWaitM
ode
]))
XLByteLE
(
XactCommitLSN
,
WalSndCtl
->
lsn
[
m
ode
]))
{
LWLockRelease
(
SyncRepLock
);
return
;
...
...
@@ -134,8 +132,8 @@ SyncRepWaitForLSN(XLogRecPtr XactCommitLSN)
*/
MyProc
->
waitLSN
=
XactCommitLSN
;
MyProc
->
syncRepState
=
SYNC_REP_WAITING
;
SyncRepQueueInsert
(
SyncRepWaitM
ode
);
Assert
(
SyncRepQueueIsOrderedByLSN
(
SyncRepWaitM
ode
));
SyncRepQueueInsert
(
m
ode
);
Assert
(
SyncRepQueueIsOrderedByLSN
(
m
ode
));
LWLockRelease
(
SyncRepLock
);
/* Alter ps display to show waiting for sync rep. */
...
...
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