Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 69059d3

Browse filesBrowse files
committed
In TrimCLOG(), don't reset XactCtl->shared->latest_page_number.
Since the CLOG page number is not recorded directly in the checkpoint record, we have to use ShmemVariableCache->nextXid to figure out the latest CLOG page number at the start of recovery. However, as recovery progresses, replay of CLOG/EXTEND records will update our notion of the latest page number, and we should rely on that being accurate rather than recomputing the value based on an updated notion of nextXid. ShmemVariableCache->nextXid is only an approximation during recovery anyway, whereas CLOG/EXTEND records are an authoritative representation of how the SLRU has been updated. Commit 0fcc2de makes this simplification possible, as before that change clog_redo() might have injected a bogus value here, and we'd want to get rid of that before entering normal running. Patch by me, reviewed by Heikki Linnakangas. Discussion: http://postgr.es/m/CA+TgmoZYig9+AQodhF5sRXuKkJ=RgFDugLr3XX_dz_F-p=TwTg@mail.gmail.com
1 parent 0fcc2de commit 69059d3
Copy full SHA for 69059d3

File tree

Expand file treeCollapse file tree

1 file changed

+0
-5
lines changed
Filter options
  • src/backend/access/transam
Expand file treeCollapse file tree

1 file changed

+0
-5
lines changed

‎src/backend/access/transam/clog.c

Copy file name to clipboardExpand all lines: src/backend/access/transam/clog.c
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -773,11 +773,6 @@ TrimCLOG(void)
773773

774774
LWLockAcquire(XactSLRULock, LW_EXCLUSIVE);
775775

776-
/*
777-
* Re-Initialize our idea of the latest page number.
778-
*/
779-
XactCtl->shared->latest_page_number = pageno;
780-
781776
/*
782777
* Zero out the remainder of the current clog page. Under normal
783778
* circumstances it should be zeroes already, but it seems at least

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.