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
a6370fd9
Commit
a6370fd9
authored
Jun 06, 2013
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that XLOG_HEAP2_VISIBLE always targets an initialized page.
Andres Freund
parent
e2c84bc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/backend/commands/vacuumlazy.c
src/backend/commands/vacuumlazy.c
+18
-0
No files found.
src/backend/commands/vacuumlazy.c
View file @
a6370fd9
...
...
@@ -663,6 +663,24 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats,
/* empty pages are always all-visible */
if
(
!
PageIsAllVisible
(
page
))
{
/*
* It's possible that another backend has extended the heap,
* initialized the page, and then failed to WAL-log the page
* due to an ERROR. Since heap extension is not WAL-logged,
* recovery might try to replay our record setting the
* page all-visible and find that the page isn't initialized,
* which will cause a PANIC. To prevent that, check whether
* the page has been previously WAL-logged, and if not, do that
* now.
*
* XXX: It would be nice to use a logging method supporting
* standard buffers here since log_newpage_buffer() will write
* the full block instead of omitting the hole.
*/
if
(
RelationNeedsWAL
(
onerel
)
&&
PageGetLSN
(
page
)
==
InvalidXLogRecPtr
)
log_newpage_buffer
(
buf
);
PageSetAllVisible
(
page
);
MarkBufferDirty
(
buf
);
visibilitymap_set
(
onerel
,
blkno
,
buf
,
InvalidXLogRecPtr
,
...
...
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