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
f3ebaad4
Commit
f3ebaad4
authored
Nov 01, 2011
by
Simon Riggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment changes to show bgwriter no longer performs checkpoints.
parent
3ba18205
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
15 deletions
+10
-15
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+3
-3
src/backend/commands/dbcommands.c
src/backend/commands/dbcommands.c
+4
-4
src/backend/postmaster/bgwriter.c
src/backend/postmaster/bgwriter.c
+2
-7
src/backend/replication/README
src/backend/replication/README
+1
-1
No files found.
src/backend/access/transam/xlog.c
View file @
f3ebaad4
...
...
@@ -8001,8 +8001,8 @@ RecoveryRestartPoint(const CheckPoint *checkPoint)
}
/*
* Copy the checkpoint record to shared memory, so that
bgwriter can use
*
i
t the next time it wants to perform a restartpoint.
* Copy the checkpoint record to shared memory, so that
checkpointer
*
can work ou
t the next time it wants to perform a restartpoint.
*/
SpinLockAcquire
(
&
xlogctl
->
info_lck
);
XLogCtl
->
lastCheckPointRecPtr
=
ReadRecPtr
;
...
...
@@ -10151,7 +10151,7 @@ XLogPageRead(XLogRecPtr *RecPtr, int emode, bool fetching_ckpt,
if
(
readFile
>=
0
&&
!
XLByteInSeg
(
*
RecPtr
,
readId
,
readSeg
))
{
/*
*
Signal bgwriter to star
t a restartpoint if we've replayed too much
*
Reques
t a restartpoint if we've replayed too much
* xlog since the last one.
*/
if
(
StandbyMode
&&
bgwriterLaunched
)
...
...
src/backend/commands/dbcommands.c
View file @
f3ebaad4
...
...
@@ -847,7 +847,7 @@ dropdb(const char *dbname, bool missing_ok)
pgstat_drop_database
(
db_id
);
/*
* Tell
bgwri
ter to forget any pending fsync and unlink requests for files
* Tell
checkpoin
ter to forget any pending fsync and unlink requests for files
* in the database; else the fsyncs will fail at next checkpoint, or
* worse, it will delete files that belong to a newly created database
* with the same OID.
...
...
@@ -855,9 +855,9 @@ dropdb(const char *dbname, bool missing_ok)
ForgetDatabaseFsyncRequests
(
db_id
);
/*
* Force a checkpoint to make sure the
bgwri
ter has received the message
* Force a checkpoint to make sure the
checkpoin
ter has received the message
* sent by ForgetDatabaseFsyncRequests. On Windows, this also ensures that
*
the bgwriter does
n't hold any open files, which would cause rmdir() to
*
background procs do
n't hold any open files, which would cause rmdir() to
* fail.
*/
RequestCheckpoint
(
CHECKPOINT_IMMEDIATE
|
CHECKPOINT_FORCE
|
CHECKPOINT_WAIT
);
...
...
@@ -1088,7 +1088,7 @@ movedb(const char *dbname, const char *tblspcname)
* process any pending unlink requests. Otherwise, the check for existing
* files in the target directory might fail unnecessarily, not to mention
* that the copy might fail due to source files getting deleted under it.
* On Windows, this also ensures that
the bgwriter does
n't hold any open
* On Windows, this also ensures that
background procs do
n't hold any open
* files, which would cause rmdir() to fail.
*/
RequestCheckpoint
(
CHECKPOINT_IMMEDIATE
|
CHECKPOINT_FORCE
|
CHECKPOINT_WAIT
);
...
...
src/backend/postmaster/bgwriter.c
View file @
f3ebaad4
...
...
@@ -114,11 +114,6 @@ BackgroundWriterMain(void)
/*
* Properly accept or ignore signals the postmaster might send us
*
* Note: we deliberately ignore SIGTERM, because during a standard Unix
* system shutdown cycle, init will SIGTERM all processes at once. We
* want to wait for the backends to exit, whereupon the postmaster will
* tell us it's okay to shut down (via SIGUSR2).
*
* SIGUSR1 is presently unused; keep it spare in case someday we want this
* process to participate in ProcSignal signalling.
*/
...
...
@@ -129,7 +124,7 @@ BackgroundWriterMain(void)
pqsignal
(
SIGALRM
,
SIG_IGN
);
pqsignal
(
SIGPIPE
,
SIG_IGN
);
pqsignal
(
SIGUSR1
,
SIG_IGN
);
/* reserve for ProcSignal */
pqsignal
(
SIGUSR2
,
SIG_IGN
);
/* request shutdown */
pqsignal
(
SIGUSR2
,
SIG_IGN
);
/*
* Reset some signals that are accepted by postmaster but not here
...
...
@@ -359,7 +354,7 @@ BgSigHupHandler(SIGNAL_ARGS)
got_SIGHUP
=
true
;
}
/* SIG
USR2: set flag to run a shutdown checkpoint
and exit */
/* SIG
TERM: set flag to shutdown
and exit */
static
void
ReqShutdownHandler
(
SIGNAL_ARGS
)
{
...
...
src/backend/replication/README
View file @
f3ebaad4
...
...
@@ -68,7 +68,7 @@ that's not desirable for walsenders, because we want the standby servers to
receive all the WAL, including the shutdown checkpoint, before the master
is shut down. Therefore postmaster treats walsenders like the pgarch process,
and instructs them to terminate at PM_SHUTDOWN_2 phase, after all regular
backends have died and
bgwriter has written
the shutdown checkpoint.
backends have died and
checkpointer has issued
the shutdown checkpoint.
When postmaster accepts a connection, it immediately forks a new process
to handle the handshake and authentication, and the process initializes to
...
...
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