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
400916b6
Commit
400916b6
authored
Jun 28, 2010
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
emode_for_corrupt_record shouldn't reduce LOG messages to WARNING.
In non-interactive sessions, WARNING sorts below LOG.
parent
ee37fb57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
28 deletions
+9
-28
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+9
-28
No files found.
src/backend/access/transam/xlog.c
View file @
400916b6
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.42
6 2010/06/17 17:37:23 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.42
7 2010/06/28 19:46:19 rhaas
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -9542,8 +9542,13 @@ triggered:
* in the current WAL page, previously read by XLogPageRead().
*
* 'emode' is the error mode that would be used to report a file-not-found
* or legitimate end-of-WAL situation. It is upgraded to WARNING or PANIC
* if a corrupt record is not expected at this point.
* or legitimate end-of-WAL situation. Generally, we use it as-is, but if
* we're retrying the exact same record that we've tried previously, only
* complain the first time to keep the noise down. However, we only do when
* reading from pg_xlog, because we don't expect any invalid records in archive
* or in records streamed from master. Files in the archive should be complete,
* and we should never hit the end of WAL because we stop and wait for more WAL
* to arrive before replaying it.
*
* NOTE: This function remembers the RecPtr value it was last called with,
* to suppress repeated messages about the same record. Only call this when
...
...
@@ -9555,31 +9560,7 @@ emode_for_corrupt_record(int emode, XLogRecPtr RecPtr)
{
static
XLogRecPtr
lastComplaint
=
{
0
,
0
};
/*
* We don't expect any invalid records in archive or in records streamed
* from master. Files in the archive should be complete, and we should
* never hit the end of WAL because we stop and wait for more WAL to
* arrive before replaying it.
*
* In standby mode, throw a WARNING and keep retrying. If we're lucky
* it's a transient error and will go away by itself, and in any case
* it's better to keep the standby open for any possible read-only
* queries. We throw WARNING in PITR as well, which causes the recovery
* to end. That's questionable, you probably would want to abort the
* recovery if the archive is corrupt and investigate the situation.
* But that's the behavior we've always had, and it does make sense
* for tools like pg_standby that implement a standby mode externally.
*/
if
(
readSource
==
XLOG_FROM_STREAM
||
readSource
==
XLOG_FROM_ARCHIVE
)
{
if
(
emode
<
WARNING
)
emode
=
WARNING
;
}
/*
* If we retry reading a record in pg_xlog, only complain on the first
* time to keep the noise down.
*/
else
if
(
emode
==
LOG
)
if
(
readSource
==
XLOG_FROM_PG_XLOG
&&
emode
==
LOG
)
{
if
(
XLByteEQ
(
RecPtr
,
lastComplaint
))
emode
=
DEBUG1
;
...
...
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