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
1c15aac5
Commit
1c15aac5
authored
Jul 19, 2016
by
Kevin Grittner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment & docs about no vacuum truncation with sto.
Omission noted by Andres Freund.
parent
b11e9bbc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+9
-0
src/backend/commands/vacuumlazy.c
src/backend/commands/vacuumlazy.c
+9
-0
No files found.
doc/src/sgml/config.sgml
View file @
1c15aac5
...
...
@@ -2091,6 +2091,15 @@ include_dir 'conf.d'
transaction ID wraparound may occur in much shorter time frames.
</para>
<para>
When this feature is enabled, freed space at the end of a relation
cannot be released to the operating system, since that could remove
information needed to detect the <literal>snapshot too old</>
condition. All space allocated to a relation remains associated with
that relation for reuse only within that relation unless explicitly
freed (for example, with <command>VACUUM FULL</>).
</para>
<para>
This setting does not attempt to guarantee that an error will be
generated under any particular circumstances. In fact, if the
...
...
src/backend/commands/vacuumlazy.c
View file @
1c15aac5
...
...
@@ -1663,6 +1663,15 @@ lazy_cleanup_index(Relation indrel,
* Don't even think about it unless we have a shot at releasing a goodly
* number of pages. Otherwise, the time taken isn't worth it.
*
* Also don't attempt it if we are doing early pruning/vacuuming, because a
* scan which cannot find a truncated heap page cannot determine that the
* snapshot is too old to read that page. We might be able to get away with
* truncating all except one of the pages, setting its LSN to (at least) the
* maximum of the truncated range if we also treated an index leaf tuple
* pointing to a missing heap page as something to trigger the "snapshot too
* old" error, but that seems fragile and seems like it deserves its own patch
* if we consider it.
*
* This is split out so that we can test whether truncation is going to be
* called for before we actually do it. If you change the logic here, be
* careful to depend only on fields that lazy_scan_heap updates on-the-fly.
...
...
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