Skip to content

Commit

Permalink
Optimize storing of null page in WAL (#5910)
Browse files Browse the repository at this point in the history
## Problem

PG16 (neondatabase/postgres#327) adds new
function to SMGR: zeroextend
It's implementation in Neon actually wal-log zero pages of extended
relation.
This zero page is wal-logged using XLOG_FPI.
As far as page is zero, the hole optimization (excluding from the image
everything between pg_upper and pd_lower) doesn't work.

## Summary of changes

In case of zero page (`PageIsNull()` returns true) assume
`hole_size=BLCKSZ`

## Checklist before requesting a review

- [ ] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] Do we need to implement analytics? if so did you add the relevant
metrics to the dashboard?
- [ ] If this PR requires public announcement, mark it with
/release-notes label and add several sentences in this section.

## Checklist before merging

- [ ] Do not forget to reformat commit message to not include the above
checklist

---------

Co-authored-by: Konstantin Knizhnik <[email protected]>
  • Loading branch information
knizhnik and Konstantin Knizhnik authored Nov 29, 2023
1 parent 78e73b2 commit 6489059
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vendor/postgres-v16
2 changes: 1 addition & 1 deletion vendor/revisions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"postgres-v16": "763000f1d0873b827829c41f2f6f799ffc0de55c",
"postgres-v16": "e3a22b72922055f9212eca12700190f118578362",
"postgres-v15": "bc88f539312fcc4bb292ce94ae9db09ab6656e8a",
"postgres-v14": "dd067cf656f6810a25aca6025633d32d02c5085a"
}

1 comment on commit 6489059

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2468 tests run: 2367 passed, 0 failed, 101 skipped (full report)


Flaky tests (3)

Postgres 16

  • test_branching_with_pgbench[cascade-1-10]: debug

Postgres 15

  • test_restarts_frequent_checkpoints: release

Postgres 14

  • test_timeline_deletion_with_files_stuck_in_upload_queue: debug

Code coverage (full report)

  • functions: 54.3% (9159 of 16854 functions)
  • lines: 82.1% (53440 of 65129 lines)

The comment gets automatically updated with the latest test results
6489059 at 2023-11-29T11:13:30.284Z :recycle:

Please sign in to comment.